Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/interpreter/bytecode-array-builder.h" | 7 #include "src/interpreter/bytecode-array-builder.h" |
| 8 #include "src/interpreter/bytecode-array-iterator.h" | 8 #include "src/interpreter/bytecode-array-iterator.h" |
| 9 #include "test/unittests/test-utils.h" | 9 #include "test/unittests/test-utils.h" |
| 10 | 10 |
| (...skipping 23 matching lines...) Expand all Loading... | |
| 34 .LoadLiteral(Smi::FromInt(8)) | 34 .LoadLiteral(Smi::FromInt(8)) |
| 35 .LoadLiteral(Smi::FromInt(10000000)) | 35 .LoadLiteral(Smi::FromInt(10000000)) |
| 36 .LoadUndefined() | 36 .LoadUndefined() |
| 37 .LoadNull() | 37 .LoadNull() |
| 38 .LoadTheHole() | 38 .LoadTheHole() |
| 39 .LoadTrue() | 39 .LoadTrue() |
| 40 .LoadFalse(); | 40 .LoadFalse(); |
| 41 | 41 |
| 42 // Emit accumulator transfers. | 42 // Emit accumulator transfers. |
| 43 Register reg(0); | 43 Register reg(0); |
| 44 builder.LoadAccumulatorWithRegister(reg).StoreAccumulatorInRegister(reg); | 44 builder.LoadAccumulatorWithRegister(reg) |
| 45 .LoadNull() | |
|
rmcilroy
2015/11/12 14:24:26
nit - comment on why this is required.
mythria
2015/11/13 10:14:37
Done.
| |
| 46 .StoreAccumulatorInRegister(reg); | |
| 45 | 47 |
| 46 // Emit global load / store operations. | 48 // Emit global load / store operations. |
| 47 builder.LoadGlobal(0, 1, LanguageMode::SLOPPY, TypeofMode::NOT_INSIDE_TYPEOF) | 49 builder.LoadGlobal(0, 1, LanguageMode::SLOPPY, TypeofMode::NOT_INSIDE_TYPEOF) |
| 48 .LoadGlobal(0, 1, LanguageMode::STRICT, TypeofMode::NOT_INSIDE_TYPEOF) | 50 .LoadGlobal(0, 1, LanguageMode::STRICT, TypeofMode::NOT_INSIDE_TYPEOF) |
| 49 .LoadGlobal(0, 1, LanguageMode::SLOPPY, TypeofMode::INSIDE_TYPEOF) | 51 .LoadGlobal(0, 1, LanguageMode::SLOPPY, TypeofMode::INSIDE_TYPEOF) |
| 50 .LoadGlobal(0, 1, LanguageMode::STRICT, TypeofMode::INSIDE_TYPEOF) | 52 .LoadGlobal(0, 1, LanguageMode::STRICT, TypeofMode::INSIDE_TYPEOF) |
| 51 .StoreGlobal(0, 1, LanguageMode::SLOPPY) | 53 .StoreGlobal(0, 1, LanguageMode::SLOPPY) |
| 52 .StoreGlobal(0, 1, LanguageMode::STRICT); | 54 .StoreGlobal(0, 1, LanguageMode::STRICT); |
| 53 | 55 |
| 54 // Emit wide global load / store operations. | 56 // Emit wide global load / store operations. |
| (...skipping 643 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 698 | 700 |
| 699 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn); | 701 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn); |
| 700 iterator.Advance(); | 702 iterator.Advance(); |
| 701 CHECK(iterator.done()); | 703 CHECK(iterator.done()); |
| 702 } | 704 } |
| 703 | 705 |
| 704 | 706 |
| 705 } // namespace interpreter | 707 } // namespace interpreter |
| 706 } // namespace internal | 708 } // namespace internal |
| 707 } // namespace v8 | 709 } // namespace v8 |
| OLD | NEW |