| 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 #include "src/compiler/interpreter-assembler.h" | 5 #include "src/compiler/interpreter-assembler.h" |
| 6 | 6 |
| 7 #include <ostream> | 7 #include <ostream> |
| 8 | 8 |
| 9 #include "src/compiler/graph.h" | 9 #include "src/compiler/graph.h" |
| 10 #include "src/compiler/instruction-selector.h" | 10 #include "src/compiler/instruction-selector.h" |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 Node* InterpreterAssembler::IntPtrConstant(intptr_t value) { | 169 Node* InterpreterAssembler::IntPtrConstant(intptr_t value) { |
| 170 return raw_assembler_->IntPtrConstant(value); | 170 return raw_assembler_->IntPtrConstant(value); |
| 171 } | 171 } |
| 172 | 172 |
| 173 | 173 |
| 174 Node* InterpreterAssembler::NumberConstant(double value) { | 174 Node* InterpreterAssembler::NumberConstant(double value) { |
| 175 return raw_assembler_->NumberConstant(value); | 175 return raw_assembler_->NumberConstant(value); |
| 176 } | 176 } |
| 177 | 177 |
| 178 | 178 |
| 179 Node* InterpreterAssembler::HeapConstant(Unique<HeapObject> object) { | 179 Node* InterpreterAssembler::HeapConstant(Handle<HeapObject> object) { |
| 180 return raw_assembler_->HeapConstant(object); | 180 return raw_assembler_->HeapConstant(object); |
| 181 } | 181 } |
| 182 | 182 |
| 183 | 183 |
| 184 Node* InterpreterAssembler::SmiShiftBitsConstant() { | 184 Node* InterpreterAssembler::SmiShiftBitsConstant() { |
| 185 return Int32Constant(kSmiShiftSize + kSmiTagSize); | 185 return Int32Constant(kSmiShiftSize + kSmiTagSize); |
| 186 } | 186 } |
| 187 | 187 |
| 188 | 188 |
| 189 Node* InterpreterAssembler::SmiTag(Node* value) { | 189 Node* InterpreterAssembler::SmiTag(Node* value) { |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 251 | 251 |
| 252 | 252 |
| 253 Node* InterpreterAssembler::CallJSBuiltin(int context_index, Node* receiver, | 253 Node* InterpreterAssembler::CallJSBuiltin(int context_index, Node* receiver, |
| 254 Node* arg1) { | 254 Node* arg1) { |
| 255 return CallJSBuiltin(context_index, receiver, &arg1, 1); | 255 return CallJSBuiltin(context_index, receiver, &arg1, 1); |
| 256 } | 256 } |
| 257 | 257 |
| 258 | 258 |
| 259 void InterpreterAssembler::Return() { | 259 void InterpreterAssembler::Return() { |
| 260 Node* exit_trampoline_code_object = | 260 Node* exit_trampoline_code_object = |
| 261 HeapConstant(Unique<HeapObject>::CreateImmovable( | 261 HeapConstant(isolate()->builtins()->InterpreterExitTrampoline()); |
| 262 isolate()->builtins()->InterpreterExitTrampoline())); | |
| 263 // If the order of the parameters you need to change the call signature below. | 262 // If the order of the parameters you need to change the call signature below. |
| 264 STATIC_ASSERT(0 == Linkage::kInterpreterAccumulatorParameter); | 263 STATIC_ASSERT(0 == Linkage::kInterpreterAccumulatorParameter); |
| 265 STATIC_ASSERT(1 == Linkage::kInterpreterRegisterFileParameter); | 264 STATIC_ASSERT(1 == Linkage::kInterpreterRegisterFileParameter); |
| 266 STATIC_ASSERT(2 == Linkage::kInterpreterBytecodeOffsetParameter); | 265 STATIC_ASSERT(2 == Linkage::kInterpreterBytecodeOffsetParameter); |
| 267 STATIC_ASSERT(3 == Linkage::kInterpreterBytecodeArrayParameter); | 266 STATIC_ASSERT(3 == Linkage::kInterpreterBytecodeArrayParameter); |
| 268 STATIC_ASSERT(4 == Linkage::kInterpreterDispatchTableParameter); | 267 STATIC_ASSERT(4 == Linkage::kInterpreterDispatchTableParameter); |
| 269 STATIC_ASSERT(5 == Linkage::kInterpreterContextParameter); | 268 STATIC_ASSERT(5 == Linkage::kInterpreterContextParameter); |
| 270 Node* args[] = { GetAccumulator(), | 269 Node* args[] = { GetAccumulator(), |
| 271 RegisterFileRawPointer(), | 270 RegisterFileRawPointer(), |
| 272 BytecodeOffset(), | 271 BytecodeOffset(), |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 347 return raw_assembler_->schedule(); | 346 return raw_assembler_->schedule(); |
| 348 } | 347 } |
| 349 | 348 |
| 350 | 349 |
| 351 Zone* InterpreterAssembler::zone() { return raw_assembler_->zone(); } | 350 Zone* InterpreterAssembler::zone() { return raw_assembler_->zone(); } |
| 352 | 351 |
| 353 | 352 |
| 354 } // namespace interpreter | 353 } // namespace interpreter |
| 355 } // namespace internal | 354 } // namespace internal |
| 356 } // namespace v8 | 355 } // namespace v8 |
| OLD | NEW |