Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 60 LanguageMode language_mode); | 60 LanguageMode language_mode); |
| 61 | 61 |
| 62 // Store properties. The value to be stored should be in the accumulator. | 62 // Store properties. The value to be stored should be in the accumulator. |
| 63 BytecodeArrayBuilder& StoreNamedProperty(Register object, Register name, | 63 BytecodeArrayBuilder& StoreNamedProperty(Register object, Register name, |
| 64 int feedback_slot, | 64 int feedback_slot, |
| 65 LanguageMode language_mode); | 65 LanguageMode language_mode); |
| 66 BytecodeArrayBuilder& StoreKeyedProperty(Register object, Register key, | 66 BytecodeArrayBuilder& StoreKeyedProperty(Register object, Register key, |
| 67 int feedback_slot, | 67 int feedback_slot, |
| 68 LanguageMode language_mode); | 68 LanguageMode language_mode); |
| 69 | 69 |
| 70 // Call a JS function. The JSFunction or Callable to be called should be in | |
| 71 // |callable|, the receiver should be in |receiver| and all subsiquent | |
|
oth
2015/09/10 14:17:27
nit s/subsiquent/subsequent/
rmcilroy
2015/09/10 14:25:23
Done.
| |
| 72 // arguments should be in registers <receiver + 1> to | |
| 73 // <receiver + 1 + arg_count>. | |
| 74 BytecodeArrayBuilder& Call(Register callable, Register receiver, | |
| 75 size_t arg_count); | |
| 76 | |
| 70 // Operators. | 77 // Operators. |
| 71 BytecodeArrayBuilder& BinaryOperation(Token::Value binop, Register reg); | 78 BytecodeArrayBuilder& BinaryOperation(Token::Value binop, Register reg); |
| 72 | 79 |
| 73 // Flow Control. | 80 // Flow Control. |
| 74 BytecodeArrayBuilder& Return(); | 81 BytecodeArrayBuilder& Return(); |
| 75 | 82 |
| 76 private: | 83 private: |
| 77 static Bytecode BytecodeForBinaryOperation(Token::Value op); | 84 static Bytecode BytecodeForBinaryOperation(Token::Value op); |
| 78 static bool FitsInByteOperand(int value); | 85 static bool FitsInByteOperand(int value); |
| 79 static bool FitsInByteOperand(size_t value); | 86 static bool FitsInByteOperand(size_t value); |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 125 | 132 |
| 126 DISALLOW_COPY_AND_ASSIGN(TemporaryRegisterScope); | 133 DISALLOW_COPY_AND_ASSIGN(TemporaryRegisterScope); |
| 127 }; | 134 }; |
| 128 | 135 |
| 129 | 136 |
| 130 } // namespace interpreter | 137 } // namespace interpreter |
| 131 } // namespace internal | 138 } // namespace internal |
| 132 } // namespace v8 | 139 } // namespace v8 |
| 133 | 140 |
| 134 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ | 141 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ |
| OLD | NEW |