Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(157)

Side by Side Diff: src/interpreter/interpreter.h

Issue 1333843002: [runtime] Move binary operator fallbacks into the runtime. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: No need for frame states in bytecode handlers. Add test case. Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_INTERPRETER_INTERPRETER_H_ 5 #ifndef V8_INTERPRETER_INTERPRETER_H_
6 #define V8_INTERPRETER_INTERPRETER_H_ 6 #define V8_INTERPRETER_INTERPRETER_H_
7 7
8 // Clients of this interface shouldn't depend on lots of interpreter internals. 8 // Clients of this interface shouldn't depend on lots of interpreter internals.
9 // Do not include anything from src/interpreter other than 9 // Do not include anything from src/interpreter other than
10 // src/interpreter/bytecodes.h here! 10 // src/interpreter/bytecodes.h here!
11 #include "src/base/macros.h" 11 #include "src/base/macros.h"
12 #include "src/builtins.h" 12 #include "src/builtins.h"
13 #include "src/interpreter/bytecodes.h" 13 #include "src/interpreter/bytecodes.h"
14 #include "src/runtime/runtime.h"
14 15
15 namespace v8 { 16 namespace v8 {
16 namespace internal { 17 namespace internal {
17 18
18 class Isolate; 19 class Isolate;
19 class Callable; 20 class Callable;
20 class CompilationInfo; 21 class CompilationInfo;
21 22
22 namespace compiler { 23 namespace compiler {
23 class InterpreterAssembler; 24 class InterpreterAssembler;
(...skipping 17 matching lines...) Expand all
41 // Generate bytecode for |info|. 42 // Generate bytecode for |info|.
42 static bool MakeBytecode(CompilationInfo* info); 43 static bool MakeBytecode(CompilationInfo* info);
43 44
44 private: 45 private:
45 // Bytecode handler generator functions. 46 // Bytecode handler generator functions.
46 #define DECLARE_BYTECODE_HANDLER_GENERATOR(Name, ...) \ 47 #define DECLARE_BYTECODE_HANDLER_GENERATOR(Name, ...) \
47 void Do##Name(compiler::InterpreterAssembler* assembler); 48 void Do##Name(compiler::InterpreterAssembler* assembler);
48 BYTECODE_LIST(DECLARE_BYTECODE_HANDLER_GENERATOR) 49 BYTECODE_LIST(DECLARE_BYTECODE_HANDLER_GENERATOR)
49 #undef DECLARE_BYTECODE_HANDLER_GENERATOR 50 #undef DECLARE_BYTECODE_HANDLER_GENERATOR
50 51
51 // Generates code to perform the binary operations via |binop_builtin|. 52 // Generates code to perform the binary operations via |function_id|.
52 void DoBinaryOp(int builtin_context_index, 53 void DoBinaryOp(Runtime::FunctionId function_id,
53 compiler::InterpreterAssembler* assembler); 54 compiler::InterpreterAssembler* assembler);
54 55
55 // Generates code to perform a property load via |ic|. 56 // Generates code to perform a property load via |ic|.
56 void DoPropertyLoadIC(Callable ic, compiler::InterpreterAssembler* assembler); 57 void DoPropertyLoadIC(Callable ic, compiler::InterpreterAssembler* assembler);
57 58
58 // Generates code to perform a property store via |ic|. 59 // Generates code to perform a property store via |ic|.
59 void DoPropertyStoreIC(Callable ic, 60 void DoPropertyStoreIC(Callable ic,
60 compiler::InterpreterAssembler* assembler); 61 compiler::InterpreterAssembler* assembler);
61 62
62 bool IsInterpreterTableInitialized(Handle<FixedArray> handler_table); 63 bool IsInterpreterTableInitialized(Handle<FixedArray> handler_table);
63 64
64 Isolate* isolate_; 65 Isolate* isolate_;
65 66
66 DISALLOW_COPY_AND_ASSIGN(Interpreter); 67 DISALLOW_COPY_AND_ASSIGN(Interpreter);
67 }; 68 };
68 69
69 } // namespace interpreter 70 } // namespace interpreter
70 } // namespace internal 71 } // namespace internal
71 } // namespace v8 72 } // namespace v8
72 73
73 #endif // V8_INTERPRETER_INTERPRETER_H_ 74 #endif // V8_INTERPRETER_INTERPRETER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698