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

Side by Side Diff: src/full-codegen/ia32/full-codegen-ia32.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
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_IA32 5 #if V8_TARGET_ARCH_IA32
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 1404 matching lines...) Expand 10 before | Expand all | Expand 10 after
1415 void FullCodeGenerator::VisitRegExpLiteral(RegExpLiteral* expr) { 1415 void FullCodeGenerator::VisitRegExpLiteral(RegExpLiteral* expr) {
1416 Comment cmnt(masm_, "[ RegExpLiteral"); 1416 Comment cmnt(masm_, "[ RegExpLiteral");
1417 Label materialized; 1417 Label materialized;
1418 // Registers will be used as follows: 1418 // Registers will be used as follows:
1419 // edi = JS function. 1419 // edi = JS function.
1420 // ecx = literals array. 1420 // ecx = literals array.
1421 // ebx = regexp literal. 1421 // ebx = regexp literal.
1422 // eax = regexp literal clone. 1422 // eax = regexp literal clone.
1423 __ mov(edi, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); 1423 __ mov(edi, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset));
1424 __ mov(ecx, FieldOperand(edi, JSFunction::kLiteralsOffset)); 1424 __ mov(ecx, FieldOperand(edi, JSFunction::kLiteralsOffset));
1425 int literal_offset = 1425 int literal_offset = LiteralsArray::OffsetOfLiteralAt(expr->literal_index());
1426 FixedArray::kHeaderSize + expr->literal_index() * kPointerSize;
1427 __ mov(ebx, FieldOperand(ecx, literal_offset)); 1426 __ mov(ebx, FieldOperand(ecx, literal_offset));
1428 __ cmp(ebx, isolate()->factory()->undefined_value()); 1427 __ cmp(ebx, isolate()->factory()->undefined_value());
1429 __ j(not_equal, &materialized, Label::kNear); 1428 __ j(not_equal, &materialized, Label::kNear);
1430 1429
1431 // Create regexp literal using runtime function 1430 // Create regexp literal using runtime function
1432 // Result will be in eax. 1431 // Result will be in eax.
1433 __ push(ecx); 1432 __ push(ecx);
1434 __ push(Immediate(Smi::FromInt(expr->literal_index()))); 1433 __ push(Immediate(Smi::FromInt(expr->literal_index())));
1435 __ push(Immediate(expr->pattern())); 1434 __ push(Immediate(expr->pattern()));
1436 __ push(Immediate(expr->flags())); 1435 __ push(Immediate(expr->flags()));
(...skipping 3706 matching lines...) Expand 10 before | Expand all | Expand 10 after
5143 Assembler::target_address_at(call_target_address, 5142 Assembler::target_address_at(call_target_address,
5144 unoptimized_code)); 5143 unoptimized_code));
5145 return OSR_AFTER_STACK_CHECK; 5144 return OSR_AFTER_STACK_CHECK;
5146 } 5145 }
5147 5146
5148 5147
5149 } // namespace internal 5148 } // namespace internal
5150 } // namespace v8 5149 } // namespace v8
5151 5150
5152 #endif // V8_TARGET_ARCH_IA32 5151 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/full-codegen/arm64/full-codegen-arm64.cc ('k') | src/full-codegen/mips/full-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698