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

Side by Side Diff: src/ia32/macro-assembler-ia32.cc

Issue 10615002: Track allocation info (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Diff with b_e Created 8 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « src/ia32/macro-assembler-ia32.h ('k') | src/ic.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 2310 matching lines...) Expand 10 before | Expand all | Expand 10 after
2321 LoadTransitionedArrayMapConditional(FAST_SMI_ELEMENTS, 2321 LoadTransitionedArrayMapConditional(FAST_SMI_ELEMENTS,
2322 FAST_HOLEY_SMI_ELEMENTS, 2322 FAST_HOLEY_SMI_ELEMENTS,
2323 map_out, 2323 map_out,
2324 scratch, 2324 scratch,
2325 &done); 2325 &done);
2326 } 2326 }
2327 bind(&done); 2327 bind(&done);
2328 } 2328 }
2329 2329
2330 2330
2331 void test_routine(Object* context, Object* function) {
2332 context->Print();
2333 function->Print();
2334 }
2335
2336 void MacroAssembler::LoadInitialArrayMap(Register function_in,
2337 Register elements_kind,
2338 Register map_out) {
2339 Label miss, done;
2340 mov(map_out, Operand(esi, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX)));
2341 mov(map_out, FieldOperand(map_out, GlobalObject::kGlobalContextOffset));
2342 mov(map_out, Operand(map_out,
2343 Context::SlotOffset(Context::JS_ARRAY_MAPS_INDEX)));
2344 cmp(function_in, Operand(map_out,
2345 Context::SlotOffset(Context::ARRAY_FUNCTION_INDEX)));
2346 j(not_equal, &miss);
2347 mov(map_out, FieldOperand(map_out, elements_kind,
2348 times_half_pointer_size,
2349 FixedArrayBase::kHeaderSize));
2350 jmp(&done);
2351 bind(&miss);
2352 mov(map_out, FieldOperand(function_in,
2353 JSFunction::kPrototypeOrInitialMapOffset));
2354 bind(&done);
2355 }
2356
2357 void MacroAssembler::LoadInitialArrayMap(Register function_in,
2358 ElementsKind elements_kind,
2359 Register map_out) {
2360 Label miss, done;
2361 mov(map_out, Operand(esi, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX)));
2362 mov(map_out, FieldOperand(map_out, GlobalObject::kGlobalContextOffset));
2363 mov(map_out, Operand(map_out,
2364 Context::SlotOffset(Context::JS_ARRAY_MAPS_INDEX)));
2365 cmp(function_in, Operand(map_out,
2366 Context::SlotOffset(Context::ARRAY_FUNCTION_INDEX)));
2367 j(not_equal, &miss);
2368 int offset = FixedArray::kHeaderSize + elements_kind * kPointerSize;
2369 mov(map_out, FieldOperand(map_out, offset));
2370 jmp(&done);
2371 bind(&miss);
2372 mov(map_out, FieldOperand(function_in,
2373 JSFunction::kPrototypeOrInitialMapOffset));
2374 bind(&done);
2375 }
2376
2331 void MacroAssembler::LoadGlobalFunction(int index, Register function) { 2377 void MacroAssembler::LoadGlobalFunction(int index, Register function) {
2332 // Load the global or builtins object from the current context. 2378 // Load the global or builtins object from the current context.
2333 mov(function, 2379 mov(function,
2334 Operand(esi, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX))); 2380 Operand(esi, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX)));
2335 // Load the native context from the global or builtins object. 2381 // Load the native context from the global or builtins object.
2336 mov(function, FieldOperand(function, GlobalObject::kNativeContextOffset)); 2382 mov(function, FieldOperand(function, GlobalObject::kNativeContextOffset));
2337 // Load the function from the native context. 2383 // Load the function from the native context.
2338 mov(function, Operand(function, Context::SlotOffset(index))); 2384 mov(function, Operand(function, Context::SlotOffset(index)));
2339 } 2385 }
2340 2386
(...skipping 636 matching lines...) Expand 10 before | Expand all | Expand 10 after
2977 j(not_equal, call_runtime); 3023 j(not_equal, call_runtime);
2978 3024
2979 mov(ecx, FieldOperand(ebx, Map::kPrototypeOffset)); 3025 mov(ecx, FieldOperand(ebx, Map::kPrototypeOffset));
2980 cmp(ecx, isolate()->factory()->null_value()); 3026 cmp(ecx, isolate()->factory()->null_value());
2981 j(not_equal, &next); 3027 j(not_equal, &next);
2982 } 3028 }
2983 3029
2984 } } // namespace v8::internal 3030 } } // namespace v8::internal
2985 3031
2986 #endif // V8_TARGET_ARCH_IA32 3032 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/macro-assembler-ia32.h ('k') | src/ic.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698