[v8-dev] What specification of the language does v8 use?

2016-06-14 Thread Dmitriy -
As I can see in the code: src/builtins.h:438: // ES6 section 9.2.1 [[Call]] ( thisArgument, argumentsList) static void Generate_CallFunction(MacroAssembler* masm, ConvertReceiverMode mode, TailCallMode tail_call_mode); I've

Re: [v8-dev] What specification of the language does v8 use?

2016-06-14 Thread Dmitriy -
objects-call-thisargument-argumentslist > > > On Tue, Jun 14, 2016 at 12:10 PM, Dmitriy - > wrote: > > As I can see in the code: > > src/builtins.h:438: > > // ES6 section 9.2.1 [[Call]] ( thisArgument, argumentsList) >

[v8-dev] JS frame. What it consist of?

2016-06-17 Thread Dmitriy -
Hello all. I want to build js frame for function and I want to know - What does it contain? I mean not platform specific part but js specific things. -- -- v8-dev mailing list v8-dev@googlegroups.com http://groups.google.com/group/v8-dev --- You received this message because you are subscribe

[v8-dev] How v8's x64 implementation calls function

2016-07-09 Thread Dmitriy -
Hello, I try to understand what happens in this code: When you call something you are writing: __ Call(builtin, RelocInfo::CODE_TARGET); What how it looks: void MacroAssembler::Call(Handle code_object, RelocInfo::Mode rmode, TypeFeedbackId ast_

[v8-dev] Strange stack in x64 implementation

2016-07-22 Thread Dmitriy -
Hello all. I can't understand how the next construction works. We have two builtins - JSEntryTrampoline and Call They are called sequentially. First we build frame in JSEntryTrampoline: // Current stack contents: // [rsp + 2 * kPointerSize ... ] : Internal frame // [rsp + kPointerSize]

[v8-dev] What is a root register and root array?

2016-08-09 Thread Dmitriy -
Hi, in x64 implementation I can see that code const Register kRootRegister = { 13 }; // r13 (callee save). // Actual value of root register is offset from the root array's start // to take advantage of negitive 8-bit displacement values. What does it mean? It used here: Label convert_gl

Re: [v8-dev] What is a root register and root array?

2016-08-10 Thread Dmitriy -
Thx Ben. Your help is great. On Tuesday, August 9, 2016 at 7:04:19 PM UTC+7, Ben Noordhuis wrote: > > On Tue, Aug 9, 2016 at 12:54 PM, Dmitriy - > wrote: > > Hi, > > > > in x64 implementation I can see that code > > > > const Register kRootRegiste

[v8-dev] What does EMBEDDED_OBJECT reloc mode mean?

2016-08-10 Thread Dmitriy -
I've not found any doc about reloc's mode. For example what does EMBEDDED_OBJECT mean? For what does purposes it use?. I'm see what happens with this reloc mode, but high level description would be good. -- -- v8-dev mailing list v8-dev@googlegroups.com http://groups.google.com/group/v8-dev

[v8-dev] What is the first function compiled by FullCodegen

2016-08-18 Thread Dmitriy -
Hello, I run ./d8 with --print_ast key and when type something (for example "1" or "print(1 + 2)") First of all d8 print this ast: [generating full code for user-defined function: ] --- AST --- FUNC at 0 . NAME "" . INFERRED NAME "" . EXPRESSION STATEMENT at 0 . . ASSIGN at -1 . . . VAR PROXY loca

[v8-dev] What does "PROXY" mean in AST?

2016-09-09 Thread Dmitriy -
Simple example is : d8> print(1) [generating full code for user-defined function: ] --- AST --- FUNC at 0 . NAME "" . INFERRED NAME "" . EXPRESSION STATEMENT at 0 . . ASSIGN at -1 . . . VAR PROXY local[0] (mode = TEMPORARY) ".result" . . . CALL Slot(0) . . . . VAR PROXY Slot(2) (mode = DYNAMIC_GLO

[v8-dev] When we call global function in d8 what does inline caches do?

2016-09-09 Thread Dmitriy -
For example: d8> print(1) Fullcodegen call EmitCallWithLoadIC. print is a global function. Why v8 emit IC for this case? And how IC works in this case? -- -- v8-dev mailing list v8-dev@googlegroups.com http://groups.google.com/group/v8-dev --- You received this message because you are subsc

[v8-dev] VariableProxy ast class

2016-09-13 Thread Dmitriy -
Hello all, I see at FullCodegen and VariableProxy class. What does it mean? It calls EmitVariableLoad in FC but I can't understand for what purposes it has made. -- -- v8-dev mailing list v8-dev@googlegroups.com http://groups.google.com/group/v8-dev --- You received this message because you

[v8-dev] Frame for fullcodegen

2016-09-16 Thread Dmitriy -
I can see a lot of frame's descriptions in v8's source: frame.h frames.h and platfom-dependent frames-x64 and others. I'm implementing full-codegen for my platform and I'm little bit confused about frames for functions. What must I save in frame for function in fullcodegen? I think there are:

[v8-dev] How v8 uses return addres that stores in frame in ICs?

2016-09-29 Thread Dmitriy -
Hi, The v8 frame for callee (all for x64 platform) for full-codegen is: -- return_addr saved frame ptr context JsFunction -- You can see description in frames.h file - "StandardFrames are used for interpreted, full-codegen and optimized..." I try to implement ICs for my

[v8-dev] Does V8 use one stack's for js function and native code?

2016-09-29 Thread Dmitriy -
For example: c frame js frame c frame js frame js frame c frame OR c frame c frame c frame c frame -- js frame js frame js frame Does V8 separate stack on two parts - JS stack and Native stack? -- -- v8-dev mailing list v8-dev@googlegroups.com http://groups.google.com/gro

Re: [v8-dev] Does V8 use one stack's for js function and native code?

2016-09-29 Thread Dmitriy -
Thx, I'm very glad to hear it. On Thursday, September 29, 2016 at 5:11:50 PM UTC+7, Jochen Eisinger wrote: > > We use the same stack > > Best > Jochen > > Dmitriy - > schrieb am Do., 29. Sep. > 2016, 12:01: > >> For example: >> >> c frame >

[v8-dev] Error in ctor IC

2016-10-03 Thread Dmitriy -
I got an error - "#4 0x47296910 in v8::internal::StackFrameIterator::Advance() () from /home/dbezheckov/lib.target/libv8.so #5 0x4753d758 in v8::internal::IC::IC(v8::internal::IC::FrameDepth, v8::internal::Isolate*, v8::internal::FeedbackNexus*) () from /home/dbezheckov/lib

[v8-dev] What is handler chain in jsentry stub?

2016-10-06 Thread Dmitriy -
Hi, I can't understand what is it? // Invoke: Link this frame into the handler chain. __ bind(&invoke); __ PushStackHandler(); void MacroAssembler::PushStackHandler() { // Adjust this code if not the case. STATIC_ASSERT(StackHandlerConstants::kSize == 1 * kPointerSize); STATIC_ASSER

[v8-dev] Where does d8 set up builtin functions?

2016-10-06 Thread Dmitriy -
For example d8 has "print" function. I know that all bootstrapping business is in bootstrapper.cc Where v8 adds "print" function to global script context so that it can call it? -- -- v8-dev mailing list v8-dev@googlegroups.com http://groups.google.com/group/v8-dev --- You received this mess

[v8-dev] What is an extra frame when I try to call CallICStub?

2016-10-09 Thread Dmitriy -
In ic.cc: // The IC code is either invoked with no extra frames on the stack // or with a single extra frame for supporting calls. enum FrameDepth { NO_EXTRA_FRAME = 0, EXTRA_CALL_FRAME = 1 }; And CallIC: class CallIC : public IC { public: CallIC(Isolate* isolate, CallICNexus* nexus) :

[v8-dev] What is purpose of Builtins::Generate_Adaptor?

2016-10-12 Thread Dmitriy -
Hi, I try to run "print(1)" on d8 and I get following calls: (in runtime) ... -> LoadICStub -> CallICStub -> Builtin::Generate_Call -> ... -> Builtins::Generate_Adaptor I don't understand who and why calls Generate_Adaptor. -- -- v8-dev mailing list v8-dev@googlegroups.com http://groups.goog

Re: [v8-dev] What is purpose of Builtins::Generate_Adaptor?

2016-10-12 Thread Dmitriy -
CallICStub belongs this "print(1)" because when we emit call in FullCodegen we call: VisitCall -> EmitCallWithLoadIC -> CallLoadIC -> Call CallIC On Wednesday, October 12, 2016 at 6:53:20 PM UTC+7, Ben Noordhuis wrote: > > On Wed, Oct 12, 2016 at 1:25 PM, Dmitriy - >

[v8-dev] Hydrogen stubs in FullCodegen

2016-10-13 Thread Dmitriy -
Hi, I wonder that full-codegen uses hydrogens stubs: For example when I'm running var a = 10; a + 10; full-codegen calls FullCodeGenerator::EmitBinaryOp for "a + 10" and creates Handle code = CodeFactory::BinaryOpIC(isolate(), op).code(); And class BinaryOpICStub : public HydrogenCodeStub { As

[v8-dev] Re: Hydrogen stubs in FullCodegen

2016-10-17 Thread Dmitriy -
Anybody? On Thursday, October 13, 2016 at 4:22:42 PM UTC+7, Dmitriy - wrote: > > Hi, I wonder that full-codegen uses hydrogens stubs: > > For example when I'm running > var a = 10; > a + 10; > > full-codegen calls FullCodeGenerator::EmitBinaryOp for "

[v8-dev] minimalistic tests for v8

2016-11-02 Thread Dmitriy -
Hello, I'm looking for test for my port v8. The port doesn't support many features from v8, but it can run cycles, if statements, variable assignment, arithmetics etc. Do you know any test suit that test some trivial part of machine like a arrays, cycles etc? -- -- v8-dev mailing list v8-dev

[v8-dev] GC support in fullcodegen

2017-01-25 Thread Dmitriy -
Hi guys, I'm still porting v8 to my architecture) I work with 5.1 version so I don't use Ignition, only FCG, Crankshaft and Turbofan. I do a lot of work and a big part of FCG is working. Can you point me what should I do for gc support? -- -- v8-dev mailing list v8-dev@googlegroups.com http

[v8-dev] Strange code in FCG

2017-02-19 Thread Dmitriy -
Hi, I've met this code in V8: void FullCodeGenerator::EmitCreateIterResultObject(CallRuntime* expr) { ZoneList* args = expr->arguments(); DCHECK_EQ(2, args->length()); VisitForStackValue(args->at(0)); VisitForStackValue(args->at(1)); Label runtime, done; __ Allocate(JSIteratorResult:

[v8-dev] What is the difference between JSConstructEntryStub and JSEntryStub?

2017-03-03 Thread Dmitriy -
What is the difference between JSConstructEntryStub and JSEntryStub? -- -- v8-dev mailing list v8-dev@googlegroups.com http://groups.google.com/group/v8-dev --- You received this message because you are subscribed to the Google Groups "v8-dev" group. To unsubscribe from this group and stop rec

[v8-dev] Javascript AOT compiler for V8 with Ignition

2017-03-13 Thread Dmitriy -
Hi all, Today we have the Ignition interpreter and bytecode for JS. I think that we can reduce size of JavaScript code via using some compiler like javac in the Java language. In such case we didn't need to parse raw JS source. WDYT about it? -- -- v8-dev mailing list v8-dev@googlegroups.com

Re: [v8-dev] Javascript AOT compiler for V8 with Ignition

2017-03-13 Thread Dmitriy -
Yeah, thx Yang, code cache is like what I want. But are there some instruments in browser and compilers for producing Ingition bytecodes? (I don't want to use code caching) This is some example of pipeline: write script.js compile script.js into Ignition bytecode -> script-bytecode.bjs in HTML

[v8-dev] Change gc on stop-the-world gc

2017-04-28 Thread Dmitriy -
Hi all, Is there any option in V8 to use stop-the-world gc? I mean gc which doesn't use write barriers for implementation. I'm porting V8 and the barriers hasn't implemented yet and I wanted to try run V8 without gc which uses these barriers. -- -- v8-dev mailing list v8-dev@googlegroups.com

[v8-dev] Tail call optimization's test in test262

2017-05-15 Thread Dmitriy -
Hello all. I'm testing V8 version 5.1 on test262. It passes all the tests, but when I run one test independently it fail. This work only for tail-call-optimization test. For example: $ tools/run-tests.py --random-seed=0 --no-presubmit --no-stress --no-network --arch-and-mode=x64.release --rerun-

Re: [v8-dev] Tail call optimization's test in test262

2017-05-15 Thread Dmitriy -
Thx Jakob, this works. On Monday, May 15, 2017 at 5:00:05 PM UTC+7, Jakob Kummerow wrote: > > You need --harmony-tailcalls instead of --harmony (at least on current > versions; 5.1 is very old). > > On Mon, May 15, 2017 at 11:45 AM, Dmitriy - > wrote: > >> Hell

[v8-dev] Re: Remove static initializers in v8. (issue 9455088)

2012-03-13 Thread Dmitriy Vyukov
Just in case, clang can detect global constructors, so if you build code base with CXX="clang++ -Wglobal-constructors", it should warn you about all such cases. For some of our projects we added -Wglobal-constructors into Makefiles, so that no new instances are added. On Mon, Mar 12, 2012 at 3:5

[v8-dev] Re: Remove static initializers in v8. (issue 9455088)

2012-03-13 Thread Dmitriy Vyukov
lue at any point later (main, thread creation, etc). On Tue, Mar 13, 2012 at 11:31 AM, Dmitriy Vyukov wrote: > >> Just in case, clang can detect global constructors, so if you build code >> base with CXX="clang++ -Wglobal-constructors", it should warn you about all >