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

Side by Side Diff: src/interpreter/bytecodes.cc

Issue 1386313005: [Interpreter] Adds Object literal support. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@int_literal_2
Patch Set: Rebase and 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 | « src/interpreter/bytecodes.h ('k') | src/interpreter/interpreter.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/bytecodes.h" 5 #include "src/interpreter/bytecodes.h"
6 6
7 #include "src/frames.h" 7 #include "src/frames.h"
8 #include "src/interpreter/bytecode-traits.h" 8 #include "src/interpreter/bytecode-traits.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 int Register::MaxParameterIndex() { return kMaxParameterIndex; } 322 int Register::MaxParameterIndex() { return kMaxParameterIndex; }
323 323
324 324
325 uint8_t Register::ToOperand() const { return static_cast<uint8_t>(-index_); } 325 uint8_t Register::ToOperand() const { return static_cast<uint8_t>(-index_); }
326 326
327 327
328 Register Register::FromOperand(uint8_t operand) { 328 Register Register::FromOperand(uint8_t operand) {
329 return Register(-static_cast<int8_t>(operand)); 329 return Register(-static_cast<int8_t>(operand));
330 } 330 }
331 331
332
333 bool Register::AreContiguous(Register reg1, Register reg2, Register reg3,
334 Register reg4, Register reg5) {
335 if (reg1.index() + 1 != reg2.index()) {
336 return false;
337 }
338 if (reg3.is_valid() && reg2.index() + 1 != reg3.index()) {
339 return false;
340 }
341 if (reg4.is_valid() && reg3.index() + 1 != reg4.index()) {
342 return false;
343 }
344 if (reg5.is_valid() && reg4.index() + 1 != reg5.index()) {
345 return false;
346 }
347 return true;
348 }
349
332 } // namespace interpreter 350 } // namespace interpreter
333 } // namespace internal 351 } // namespace internal
334 } // namespace v8 352 } // namespace v8
OLDNEW
« no previous file with comments | « src/interpreter/bytecodes.h ('k') | src/interpreter/interpreter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698