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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 builder.LoadContextSlot(reg, 1); | 50 builder.LoadContextSlot(reg, 1); |
51 | 51 |
52 // Emit load / store property operations. | 52 // Emit load / store property operations. |
53 builder.LoadNamedProperty(reg, 0, LanguageMode::SLOPPY) | 53 builder.LoadNamedProperty(reg, 0, LanguageMode::SLOPPY) |
54 .LoadKeyedProperty(reg, 0, LanguageMode::SLOPPY) | 54 .LoadKeyedProperty(reg, 0, LanguageMode::SLOPPY) |
55 .StoreNamedProperty(reg, reg, 0, LanguageMode::SLOPPY) | 55 .StoreNamedProperty(reg, reg, 0, LanguageMode::SLOPPY) |
56 .StoreKeyedProperty(reg, reg, 0, LanguageMode::SLOPPY) | 56 .StoreKeyedProperty(reg, reg, 0, LanguageMode::SLOPPY) |
57 .LoadNamedProperty(reg, 0, LanguageMode::STRICT) | 57 .LoadNamedProperty(reg, 0, LanguageMode::STRICT) |
58 .LoadKeyedProperty(reg, 0, LanguageMode::STRICT) | 58 .LoadKeyedProperty(reg, 0, LanguageMode::STRICT) |
59 .StoreNamedProperty(reg, reg, 0, LanguageMode::STRICT) | 59 .StoreNamedProperty(reg, reg, 0, LanguageMode::STRICT) |
60 .StoreKeyedProperty(reg, reg, 0, LanguageMode::STRICT); | 60 .StoreKeyedProperty(reg, reg, 0, LanguageMode::STRICT) |
| 61 .GenericStoreKeyedProperty(reg, reg); |
61 | 62 |
62 // Emit closure operations. | 63 // Emit closure operations. |
63 builder.CreateClosure(NOT_TENURED); | 64 builder.CreateClosure(NOT_TENURED); |
64 | 65 |
| 66 // Emit literal creation operations |
| 67 builder.CreateArrayLiteral(0, 0); |
| 68 |
65 // Call operations. | 69 // Call operations. |
66 builder.Call(reg, reg, 0); | 70 builder.Call(reg, reg, 0); |
67 builder.CallRuntime(Runtime::kIsArray, reg, 1); | 71 builder.CallRuntime(Runtime::kIsArray, reg, 1); |
68 | 72 |
69 // Emit binary operator invocations. | 73 // Emit binary operator invocations. |
70 builder.BinaryOperation(Token::Value::ADD, reg, Strength::WEAK) | 74 builder.BinaryOperation(Token::Value::ADD, reg, Strength::WEAK) |
71 .BinaryOperation(Token::Value::SUB, reg, Strength::WEAK) | 75 .BinaryOperation(Token::Value::SUB, reg, Strength::WEAK) |
72 .BinaryOperation(Token::Value::MUL, reg, Strength::WEAK) | 76 .BinaryOperation(Token::Value::MUL, reg, Strength::WEAK) |
73 .BinaryOperation(Token::Value::DIV, reg, Strength::WEAK) | 77 .BinaryOperation(Token::Value::DIV, reg, Strength::WEAK) |
74 .BinaryOperation(Token::Value::MOD, reg, Strength::WEAK); | 78 .BinaryOperation(Token::Value::MOD, reg, Strength::WEAK); |
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
461 | 465 |
462 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn); | 466 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn); |
463 iterator.Advance(); | 467 iterator.Advance(); |
464 CHECK(iterator.done()); | 468 CHECK(iterator.done()); |
465 } | 469 } |
466 | 470 |
467 | 471 |
468 } // namespace interpreter | 472 } // namespace interpreter |
469 } // namespace internal | 473 } // namespace internal |
470 } // namespace v8 | 474 } // namespace v8 |
OLD | NEW |