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

Side by Side Diff: src/ia32/stub-cache-ia32.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/fast-codegen.cc ('k') | src/ic.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 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 316
317 // Check that the receiver isn't a smi. 317 // Check that the receiver isn't a smi.
318 __ test(receiver, Immediate(kSmiTagMask)); 318 __ test(receiver, Immediate(kSmiTagMask));
319 __ j(zero, miss, not_taken); 319 __ j(zero, miss, not_taken);
320 320
321 // Check that the maps haven't changed. 321 // Check that the maps haven't changed.
322 Register reg = 322 Register reg =
323 stub_compiler->CheckPrototypes(object, receiver, holder, 323 stub_compiler->CheckPrototypes(object, receiver, holder,
324 scratch1, scratch2, name, miss); 324 scratch1, scratch2, name, miss);
325 325
326 if (lookup->IsValid() && lookup->IsCacheable()) { 326 if (lookup->IsProperty() && lookup->IsCacheable()) {
327 compiler->CompileCacheable(masm, 327 compiler->CompileCacheable(masm,
328 stub_compiler, 328 stub_compiler,
329 receiver, 329 receiver,
330 reg, 330 reg,
331 scratch1, 331 scratch1,
332 scratch2, 332 scratch2,
333 holder, 333 holder,
334 lookup, 334 lookup,
335 name, 335 name,
336 miss); 336 miss);
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
477 477
478 478
479 // Holds information about possible function call optimizations. 479 // Holds information about possible function call optimizations.
480 class CallOptimization BASE_EMBEDDED { 480 class CallOptimization BASE_EMBEDDED {
481 public: 481 public:
482 explicit CallOptimization(LookupResult* lookup) 482 explicit CallOptimization(LookupResult* lookup)
483 : constant_function_(NULL), 483 : constant_function_(NULL),
484 is_simple_api_call_(false), 484 is_simple_api_call_(false),
485 expected_receiver_type_(NULL), 485 expected_receiver_type_(NULL),
486 api_call_info_(NULL) { 486 api_call_info_(NULL) {
487 if (!lookup->IsValid() || !lookup->IsCacheable()) return; 487 if (!lookup->IsProperty() || !lookup->IsCacheable()) return;
488 488
489 // We only optimize constant function calls. 489 // We only optimize constant function calls.
490 if (lookup->type() != CONSTANT_FUNCTION) return; 490 if (lookup->type() != CONSTANT_FUNCTION) return;
491 491
492 Initialize(lookup->GetConstantFunction()); 492 Initialize(lookup->GetConstantFunction());
493 } 493 }
494 494
495 explicit CallOptimization(JSFunction* function) { 495 explicit CallOptimization(JSFunction* function) {
496 Initialize(function); 496 Initialize(function);
497 } 497 }
(...skipping 1704 matching lines...) Expand 10 before | Expand all | Expand 10 after
2202 __ jmp(generic_construct_stub, RelocInfo::CODE_TARGET); 2202 __ jmp(generic_construct_stub, RelocInfo::CODE_TARGET);
2203 2203
2204 // Return the generated code. 2204 // Return the generated code.
2205 return GetCode(); 2205 return GetCode();
2206 } 2206 }
2207 2207
2208 2208
2209 #undef __ 2209 #undef __
2210 2210
2211 } } // namespace v8::internal 2211 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/fast-codegen.cc ('k') | src/ic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698