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

Side by Side Diff: src/interpreter/bytecode-array-builder.h

Issue 1323463005: [Interpreter] Add support for JS calls. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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_BYTECODE_ARRAY_BUILDER_H_ 5 #ifndef V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_
6 #define V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ 6 #define V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "src/ast.h" 10 #include "src/ast.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 // Register-accumulator transfers. 49 // Register-accumulator transfers.
50 BytecodeArrayBuilder& LoadAccumulatorWithRegister(Register reg); 50 BytecodeArrayBuilder& LoadAccumulatorWithRegister(Register reg);
51 BytecodeArrayBuilder& StoreAccumulatorInRegister(Register reg); 51 BytecodeArrayBuilder& StoreAccumulatorInRegister(Register reg);
52 52
53 // Load properties. The property name should be in the accumulator. 53 // Load properties. The property name should be in the accumulator.
54 BytecodeArrayBuilder& LoadNamedProperty(Register object, int feedback_slot, 54 BytecodeArrayBuilder& LoadNamedProperty(Register object, int feedback_slot,
55 LanguageMode language_mode); 55 LanguageMode language_mode);
56 BytecodeArrayBuilder& LoadKeyedProperty(Register object, int feedback_slot, 56 BytecodeArrayBuilder& LoadKeyedProperty(Register object, int feedback_slot,
57 LanguageMode language_mode); 57 LanguageMode language_mode);
58 58
59 // Call JS function. The function to be called should be in the accumulator
60 // and all arguments (including the receiver) should be in registers
61 // <first_arg> to <first_arg + count>.
62 BytecodeArrayBuilder& CallJS(Register first_arg, size_t arg_count);
63
59 // Operators. 64 // Operators.
60 BytecodeArrayBuilder& BinaryOperation(Token::Value binop, Register reg); 65 BytecodeArrayBuilder& BinaryOperation(Token::Value binop, Register reg);
61 66
62 // Flow Control. 67 // Flow Control.
63 BytecodeArrayBuilder& Return(); 68 BytecodeArrayBuilder& Return();
64 69
65 private: 70 private:
66 static Bytecode BytecodeForBinaryOperation(Token::Value op); 71 static Bytecode BytecodeForBinaryOperation(Token::Value op);
67 static bool FitsInByteOperand(int value); 72 static bool FitsInByteOperand(int value);
68 static bool FitsInByteOperand(size_t value); 73 static bool FitsInByteOperand(size_t value);
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 119
115 DISALLOW_COPY_AND_ASSIGN(TemporaryRegisterScope); 120 DISALLOW_COPY_AND_ASSIGN(TemporaryRegisterScope);
116 }; 121 };
117 122
118 123
119 } // namespace interpreter 124 } // namespace interpreter
120 } // namespace internal 125 } // namespace internal
121 } // namespace v8 126 } // namespace v8
122 127
123 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ 128 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698