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

Side by Side Diff: src/full-codegen/x64/full-codegen-x64.cc

Issue 1374723002: Introduce LiteralsArray to hide it's implementation. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix build break. 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/full-codegen/mips64/full-codegen-mips64.cc ('k') | src/hydrogen.cc » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 #if V8_TARGET_ARCH_X64 5 #if V8_TARGET_ARCH_X64
6 6
7 #include "src/code-factory.h" 7 #include "src/code-factory.h"
8 #include "src/code-stubs.h" 8 #include "src/code-stubs.h"
9 #include "src/codegen.h" 9 #include "src/codegen.h"
10 #include "src/compiler.h" 10 #include "src/compiler.h"
(...skipping 1435 matching lines...) Expand 10 before | Expand all | Expand 10 after
1446 void FullCodeGenerator::VisitRegExpLiteral(RegExpLiteral* expr) { 1446 void FullCodeGenerator::VisitRegExpLiteral(RegExpLiteral* expr) {
1447 Comment cmnt(masm_, "[ RegExpLiteral"); 1447 Comment cmnt(masm_, "[ RegExpLiteral");
1448 Label materialized; 1448 Label materialized;
1449 // Registers will be used as follows: 1449 // Registers will be used as follows:
1450 // rdi = JS function. 1450 // rdi = JS function.
1451 // rcx = literals array. 1451 // rcx = literals array.
1452 // rbx = regexp literal. 1452 // rbx = regexp literal.
1453 // rax = regexp literal clone. 1453 // rax = regexp literal clone.
1454 __ movp(rdi, Operand(rbp, JavaScriptFrameConstants::kFunctionOffset)); 1454 __ movp(rdi, Operand(rbp, JavaScriptFrameConstants::kFunctionOffset));
1455 __ movp(rcx, FieldOperand(rdi, JSFunction::kLiteralsOffset)); 1455 __ movp(rcx, FieldOperand(rdi, JSFunction::kLiteralsOffset));
1456 int literal_offset = 1456 int literal_offset = LiteralsArray::OffsetOfLiteralAt(expr->literal_index());
1457 FixedArray::kHeaderSize + expr->literal_index() * kPointerSize;
1458 __ movp(rbx, FieldOperand(rcx, literal_offset)); 1457 __ movp(rbx, FieldOperand(rcx, literal_offset));
1459 __ CompareRoot(rbx, Heap::kUndefinedValueRootIndex); 1458 __ CompareRoot(rbx, Heap::kUndefinedValueRootIndex);
1460 __ j(not_equal, &materialized, Label::kNear); 1459 __ j(not_equal, &materialized, Label::kNear);
1461 1460
1462 // Create regexp literal using runtime function 1461 // Create regexp literal using runtime function
1463 // Result will be in rax. 1462 // Result will be in rax.
1464 __ Push(rcx); 1463 __ Push(rcx);
1465 __ Push(Smi::FromInt(expr->literal_index())); 1464 __ Push(Smi::FromInt(expr->literal_index()));
1466 __ Push(expr->pattern()); 1465 __ Push(expr->pattern());
1467 __ Push(expr->flags()); 1466 __ Push(expr->flags());
(...skipping 3691 matching lines...) Expand 10 before | Expand all | Expand 10 after
5159 Assembler::target_address_at(call_target_address, 5158 Assembler::target_address_at(call_target_address,
5160 unoptimized_code)); 5159 unoptimized_code));
5161 return OSR_AFTER_STACK_CHECK; 5160 return OSR_AFTER_STACK_CHECK;
5162 } 5161 }
5163 5162
5164 5163
5165 } // namespace internal 5164 } // namespace internal
5166 } // namespace v8 5165 } // namespace v8
5167 5166
5168 #endif // V8_TARGET_ARCH_X64 5167 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/full-codegen/mips64/full-codegen-mips64.cc ('k') | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698