Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(342)

Side by Side Diff: test/unittests/interpreter/bytecode-array-builder-unittest.cc

Issue 1410853002: [Interpreter] Add support for RegExp literals. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « test/cctest/interpreter/test-interpreter.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 61
62 // Emit closure operations. 62 // Emit closure operations.
63 builder.CreateClosure(NOT_TENURED); 63 builder.CreateClosure(NOT_TENURED);
64 64
65 // Emit literal creation operations 65 // Emit literal creation operations
66 builder.CreateArrayLiteral(0, 0) 66 builder.CreateRegExpLiteral(0, reg)
67 .CreateArrayLiteral(0, 0)
67 .CreateObjectLiteral(0, 0); 68 .CreateObjectLiteral(0, 0);
68 69
69 // Call operations. 70 // Call operations.
70 builder.Call(reg, reg, 0); 71 builder.Call(reg, reg, 0);
71 builder.CallRuntime(Runtime::kIsArray, reg, 1); 72 builder.CallRuntime(Runtime::kIsArray, reg, 1);
72 73
73 // Emit binary operator invocations. 74 // Emit binary operator invocations.
74 builder.BinaryOperation(Token::Value::ADD, reg, Strength::WEAK) 75 builder.BinaryOperation(Token::Value::ADD, reg, Strength::WEAK)
75 .BinaryOperation(Token::Value::SUB, reg, Strength::WEAK) 76 .BinaryOperation(Token::Value::SUB, reg, Strength::WEAK)
76 .BinaryOperation(Token::Value::MUL, reg, Strength::WEAK) 77 .BinaryOperation(Token::Value::MUL, reg, Strength::WEAK)
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 476
476 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn); 477 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn);
477 iterator.Advance(); 478 iterator.Advance();
478 CHECK(iterator.done()); 479 CHECK(iterator.done());
479 } 480 }
480 481
481 482
482 } // namespace interpreter 483 } // namespace interpreter
483 } // namespace internal 484 } // namespace internal
484 } // namespace v8 485 } // namespace v8
OLDNEW
« no previous file with comments | « test/cctest/interpreter/test-interpreter.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698