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

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

Issue 1396693003: [Interpreter] Add function literal support. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@int_newcontext
Patch Set: Review comments 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 // Emit load / store property operations. 50 // Emit load / store property operations.
51 builder.LoadNamedProperty(reg, 0, LanguageMode::SLOPPY) 51 builder.LoadNamedProperty(reg, 0, LanguageMode::SLOPPY)
52 .LoadKeyedProperty(reg, 0, LanguageMode::SLOPPY) 52 .LoadKeyedProperty(reg, 0, LanguageMode::SLOPPY)
53 .StoreNamedProperty(reg, reg, 0, LanguageMode::SLOPPY) 53 .StoreNamedProperty(reg, reg, 0, LanguageMode::SLOPPY)
54 .StoreKeyedProperty(reg, reg, 0, LanguageMode::SLOPPY) 54 .StoreKeyedProperty(reg, reg, 0, LanguageMode::SLOPPY)
55 .LoadNamedProperty(reg, 0, LanguageMode::STRICT) 55 .LoadNamedProperty(reg, 0, LanguageMode::STRICT)
56 .LoadKeyedProperty(reg, 0, LanguageMode::STRICT) 56 .LoadKeyedProperty(reg, 0, LanguageMode::STRICT)
57 .StoreNamedProperty(reg, reg, 0, LanguageMode::STRICT) 57 .StoreNamedProperty(reg, reg, 0, LanguageMode::STRICT)
58 .StoreKeyedProperty(reg, reg, 0, LanguageMode::STRICT); 58 .StoreKeyedProperty(reg, reg, 0, LanguageMode::STRICT);
59 59
60 // Emit closure operations.
61 builder.CreateClosure(NOT_TENURED);
62
60 // Call operations. 63 // Call operations.
61 builder.Call(reg, reg, 0); 64 builder.Call(reg, reg, 0);
62 builder.CallRuntime(Runtime::kIsArray, reg, 1); 65 builder.CallRuntime(Runtime::kIsArray, reg, 1);
63 66
64 // Emit binary operator invocations. 67 // Emit binary operator invocations.
65 builder.BinaryOperation(Token::Value::ADD, reg, Strength::WEAK) 68 builder.BinaryOperation(Token::Value::ADD, reg, Strength::WEAK)
66 .BinaryOperation(Token::Value::SUB, reg, Strength::WEAK) 69 .BinaryOperation(Token::Value::SUB, reg, Strength::WEAK)
67 .BinaryOperation(Token::Value::MUL, reg, Strength::WEAK) 70 .BinaryOperation(Token::Value::MUL, reg, Strength::WEAK)
68 .BinaryOperation(Token::Value::DIV, reg, Strength::WEAK) 71 .BinaryOperation(Token::Value::DIV, reg, Strength::WEAK)
69 .BinaryOperation(Token::Value::MOD, reg, Strength::WEAK); 72 .BinaryOperation(Token::Value::MOD, reg, Strength::WEAK);
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 459
457 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn); 460 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn);
458 iterator.Advance(); 461 iterator.Advance();
459 CHECK(iterator.done()); 462 CHECK(iterator.done());
460 } 463 }
461 464
462 465
463 } // namespace interpreter 466 } // namespace interpreter
464 } // namespace internal 467 } // namespace internal
465 } // namespace v8 468 } // 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