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

Side by Side Diff: src/arm/stub-cache-arm.cc

Issue 1539034: Add inline caches for loading non-existing properties. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/globals.h » ('j') | src/stub-cache.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-2009 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 1371 matching lines...) Expand 10 before | Expand all | Expand 10 after
1382 __ bind(&miss); 1382 __ bind(&miss);
1383 __ IncrementCounter(&Counters::named_store_global_inline_miss, 1, r4, r3); 1383 __ IncrementCounter(&Counters::named_store_global_inline_miss, 1, r4, r3);
1384 Handle<Code> ic(Builtins::builtin(Builtins::StoreIC_Miss)); 1384 Handle<Code> ic(Builtins::builtin(Builtins::StoreIC_Miss));
1385 __ Jump(ic, RelocInfo::CODE_TARGET); 1385 __ Jump(ic, RelocInfo::CODE_TARGET);
1386 1386
1387 // Return the generated code. 1387 // Return the generated code.
1388 return GetCode(NORMAL, name); 1388 return GetCode(NORMAL, name);
1389 } 1389 }
1390 1390
1391 1391
1392 Object* LoadStubCompiler::CompileLoadNonExisting(JSObject* object) {
1393 // ----------- S t a t e -------------
1394 // -- r2 : name
1395 // -- lr : return address
1396 // -- [sp] : receiver
1397 // -----------------------------------
1398 Label miss;
1399
1400 // Load receiver.
1401 __ ldr(r0, MemOperand(sp, 0));
1402
1403 // Check the maps of the full prototype chain.
1404 JSObject* last = object;
1405 while (last->GetPrototype() != Heap::null_value()) {
1406 last = JSObject::cast(last->GetPrototype());
1407 }
1408 CheckPrototypes(object, r0, last, r3, r1, Heap::empty_string(), &miss);
1409
1410 // Return undefined if maps of the full prototype chain is still the same.
1411 __ LoadRoot(r0, Heap::kUndefinedValueRootIndex);
1412 __ Ret();
1413
1414 __ bind(&miss);
1415 GenerateLoadMiss(masm(), Code::LOAD_IC);
1416
1417 // Return the generated code.
1418 return GetCode(NON_EXISTING, Heap::empty_string());
1419 }
1420
1421
1392 Object* LoadStubCompiler::CompileLoadField(JSObject* object, 1422 Object* LoadStubCompiler::CompileLoadField(JSObject* object,
1393 JSObject* holder, 1423 JSObject* holder,
1394 int index, 1424 int index,
1395 String* name) { 1425 String* name) {
1396 // ----------- S t a t e ------------- 1426 // ----------- S t a t e -------------
1397 // -- r2 : name 1427 // -- r2 : name
1398 // -- lr : return address 1428 // -- lr : return address
1399 // -- [sp] : receiver 1429 // -- [sp] : receiver
1400 // ----------------------------------- 1430 // -----------------------------------
1401 Label miss; 1431 Label miss;
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after
1893 __ Jump(generic_construct_stub, RelocInfo::CODE_TARGET); 1923 __ Jump(generic_construct_stub, RelocInfo::CODE_TARGET);
1894 1924
1895 // Return the generated code. 1925 // Return the generated code.
1896 return GetCode(); 1926 return GetCode();
1897 } 1927 }
1898 1928
1899 1929
1900 #undef __ 1930 #undef __
1901 1931
1902 } } // namespace v8::internal 1932 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/globals.h » ('j') | src/stub-cache.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698