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

Side by Side Diff: src/builtins/mips/builtins-mips.cc

Issue 2549753002: Store OSR'd optimized code on the native context. (Closed)
Patch Set: Improvements. Created 4 years 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_MIPS 5 #if V8_TARGET_ARCH_MIPS
6 6
7 #include "src/codegen.h" 7 #include "src/codegen.h"
8 #include "src/debug/debug.h" 8 #include "src/debug/debug.h"
9 #include "src/deoptimizer.h" 9 #include "src/deoptimizer.h"
10 #include "src/full-codegen/full-codegen.h" 10 #include "src/full-codegen/full-codegen.h"
(...skipping 1352 matching lines...) Expand 10 before | Expand all | Expand 10 after
1363 Register temp = a1; 1363 Register temp = a1;
1364 Register array_pointer = t1; 1364 Register array_pointer = t1;
1365 1365
1366 // Does the native context match? 1366 // Does the native context match?
1367 __ sll(at, index, kPointerSizeLog2 - kSmiTagSize); 1367 __ sll(at, index, kPointerSizeLog2 - kSmiTagSize);
1368 __ Addu(array_pointer, map, Operand(at)); 1368 __ Addu(array_pointer, map, Operand(at));
1369 __ lw(temp, FieldMemOperand(array_pointer, 1369 __ lw(temp, FieldMemOperand(array_pointer,
1370 SharedFunctionInfo::kOffsetToPreviousContext)); 1370 SharedFunctionInfo::kOffsetToPreviousContext));
1371 __ lw(temp, FieldMemOperand(temp, WeakCell::kValueOffset)); 1371 __ lw(temp, FieldMemOperand(temp, WeakCell::kValueOffset));
1372 __ Branch(&loop_bottom, ne, temp, Operand(native_context)); 1372 __ Branch(&loop_bottom, ne, temp, Operand(native_context));
1373 // OSR id set to none?
1374 __ lw(temp, FieldMemOperand(array_pointer,
1375 SharedFunctionInfo::kOffsetToPreviousOsrAstId));
1376 const int bailout_id = BailoutId::None().ToInt();
1377 __ Branch(&loop_bottom, ne, temp, Operand(Smi::FromInt(bailout_id)));
1378 // Literals available? 1373 // Literals available?
1379 __ lw(temp, FieldMemOperand(array_pointer, 1374 __ lw(temp, FieldMemOperand(array_pointer,
1380 SharedFunctionInfo::kOffsetToPreviousLiterals)); 1375 SharedFunctionInfo::kOffsetToPreviousLiterals));
1381 __ lw(temp, FieldMemOperand(temp, WeakCell::kValueOffset)); 1376 __ lw(temp, FieldMemOperand(temp, WeakCell::kValueOffset));
1382 __ JumpIfSmi(temp, &gotta_call_runtime); 1377 __ JumpIfSmi(temp, &gotta_call_runtime);
1383 1378
1384 // Save the literals in the closure. 1379 // Save the literals in the closure.
1385 __ lw(t0, MemOperand(sp, 0)); 1380 __ lw(t0, MemOperand(sp, 0));
1386 __ sw(temp, FieldMemOperand(t0, JSFunction::kLiteralsOffset)); 1381 __ sw(temp, FieldMemOperand(t0, JSFunction::kLiteralsOffset));
1387 __ push(index); 1382 __ push(index);
(...skipping 1578 matching lines...) Expand 10 before | Expand all | Expand 10 after
2966 __ break_(0xCC); 2961 __ break_(0xCC);
2967 } 2962 }
2968 } 2963 }
2969 2964
2970 #undef __ 2965 #undef __
2971 2966
2972 } // namespace internal 2967 } // namespace internal
2973 } // namespace v8 2968 } // namespace v8
2974 2969
2975 #endif // V8_TARGET_ARCH_MIPS 2970 #endif // V8_TARGET_ARCH_MIPS
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698