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

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

Issue 647015: Remove the LookupResult IsValid method because it is confusing.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 10 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 | « src/api.cc ('k') | src/bootstrapper.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 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 561 matching lines...) Expand 10 before | Expand all | Expand 10 after
572 ASSERT(!holder->GetNamedInterceptor()->getter()->IsUndefined()); 572 ASSERT(!holder->GetNamedInterceptor()->getter()->IsUndefined());
573 573
574 // Check that the receiver isn't a smi. 574 // Check that the receiver isn't a smi.
575 __ BranchOnSmi(receiver, miss); 575 __ BranchOnSmi(receiver, miss);
576 576
577 // Check that the maps haven't changed. 577 // Check that the maps haven't changed.
578 Register reg = 578 Register reg =
579 stub_compiler->CheckPrototypes(object, receiver, holder, 579 stub_compiler->CheckPrototypes(object, receiver, holder,
580 scratch1, scratch2, name, miss); 580 scratch1, scratch2, name, miss);
581 581
582 if (lookup->IsValid() && lookup->IsCacheable()) { 582 if (lookup->IsProperty() && lookup->IsCacheable()) {
583 compiler->CompileCacheable(masm, 583 compiler->CompileCacheable(masm,
584 stub_compiler, 584 stub_compiler,
585 receiver, 585 receiver,
586 reg, 586 reg,
587 scratch1, 587 scratch1,
588 scratch2, 588 scratch2,
589 holder, 589 holder,
590 lookup, 590 lookup,
591 name, 591 name,
592 miss); 592 miss);
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
978 978
979 // Check that the maps haven't changed. 979 // Check that the maps haven't changed.
980 Register reg = CheckPrototypes(object, receiver, holder, holder_reg, 980 Register reg = CheckPrototypes(object, receiver, holder, holder_reg,
981 scratch, name, &miss); 981 scratch, name, &miss);
982 if (!reg.is(holder_reg)) { 982 if (!reg.is(holder_reg)) {
983 __ mov(holder_reg, reg); 983 __ mov(holder_reg, reg);
984 } 984 }
985 985
986 // If we call a constant function when the interceptor returns 986 // If we call a constant function when the interceptor returns
987 // the no-result sentinel, generate code that optimizes this case. 987 // the no-result sentinel, generate code that optimizes this case.
988 if (lookup.IsValid() && 988 if (lookup.IsProperty() &&
989 lookup.IsCacheable() && 989 lookup.IsCacheable() &&
990 lookup.type() == CONSTANT_FUNCTION && 990 lookup.type() == CONSTANT_FUNCTION &&
991 lookup.GetConstantFunction()->is_compiled() && 991 lookup.GetConstantFunction()->is_compiled() &&
992 !holder->IsJSArray()) { 992 !holder->IsJSArray()) {
993 // Constant functions cannot sit on global object. 993 // Constant functions cannot sit on global object.
994 ASSERT(!lookup.holder()->IsGlobalObject()); 994 ASSERT(!lookup.holder()->IsGlobalObject());
995 995
996 // Call the interceptor. 996 // Call the interceptor.
997 __ EnterInternalFrame(); 997 __ EnterInternalFrame();
998 __ push(holder_reg); 998 __ push(holder_reg);
(...skipping 802 matching lines...) Expand 10 before | Expand all | Expand 10 after
1801 __ Jump(generic_construct_stub, RelocInfo::CODE_TARGET); 1801 __ Jump(generic_construct_stub, RelocInfo::CODE_TARGET);
1802 1802
1803 // Return the generated code. 1803 // Return the generated code.
1804 return GetCode(); 1804 return GetCode();
1805 } 1805 }
1806 1806
1807 1807
1808 #undef __ 1808 #undef __
1809 1809
1810 } } // namespace v8::internal 1810 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/api.cc ('k') | src/bootstrapper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698