| 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/interpreter/bytecode-generator.h" | 5 #include "src/interpreter/bytecode-generator.h" |
| 6 | 6 |
| 7 #include <stack> | 7 #include <stack> |
| 8 | 8 |
| 9 #include "src/compiler.h" | 9 #include "src/compiler.h" |
| 10 #include "src/interpreter/control-flow-builders.h" | 10 #include "src/interpreter/control-flow-builders.h" |
| (...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 402 UNIMPLEMENTED(); | 402 UNIMPLEMENTED(); |
| 403 } | 403 } |
| 404 | 404 |
| 405 | 405 |
| 406 void BytecodeGenerator::VisitNativeFunctionLiteral( | 406 void BytecodeGenerator::VisitNativeFunctionLiteral( |
| 407 NativeFunctionLiteral* expr) { | 407 NativeFunctionLiteral* expr) { |
| 408 UNIMPLEMENTED(); | 408 UNIMPLEMENTED(); |
| 409 } | 409 } |
| 410 | 410 |
| 411 | 411 |
| 412 void BytecodeGenerator::VisitDoExpression(DoExpression* expr) { |
| 413 UNIMPLEMENTED(); |
| 414 } |
| 415 |
| 416 |
| 412 void BytecodeGenerator::VisitConditional(Conditional* expr) { UNIMPLEMENTED(); } | 417 void BytecodeGenerator::VisitConditional(Conditional* expr) { UNIMPLEMENTED(); } |
| 413 | 418 |
| 414 | 419 |
| 415 void BytecodeGenerator::VisitLiteral(Literal* expr) { | 420 void BytecodeGenerator::VisitLiteral(Literal* expr) { |
| 416 Handle<Object> value = expr->value(); | 421 Handle<Object> value = expr->value(); |
| 417 if (value->IsSmi()) { | 422 if (value->IsSmi()) { |
| 418 builder()->LoadLiteral(Smi::cast(*value)); | 423 builder()->LoadLiteral(Smi::cast(*value)); |
| 419 } else if (value->IsUndefined()) { | 424 } else if (value->IsUndefined()) { |
| 420 builder()->LoadUndefined(); | 425 builder()->LoadUndefined(); |
| 421 } else if (value->IsTrue()) { | 426 } else if (value->IsTrue()) { |
| (...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 855 int BytecodeGenerator::feedback_index(FeedbackVectorSlot slot) const { | 860 int BytecodeGenerator::feedback_index(FeedbackVectorSlot slot) const { |
| 856 return info()->feedback_vector()->GetIndex(slot); | 861 return info()->feedback_vector()->GetIndex(slot); |
| 857 } | 862 } |
| 858 | 863 |
| 859 | 864 |
| 860 Register BytecodeGenerator::current_context() const { return current_context_; } | 865 Register BytecodeGenerator::current_context() const { return current_context_; } |
| 861 | 866 |
| 862 } // namespace interpreter | 867 } // namespace interpreter |
| 863 } // namespace internal | 868 } // namespace internal |
| 864 } // namespace v8 | 869 } // namespace v8 |
| OLD | NEW |