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

Side by Side Diff: src/ic.cc

Issue 1148007: Merge bleeding_edge from version 2.1.3 up to revision 4205... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/partial_snapshots/
Patch Set: Created 10 years, 9 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
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 440 matching lines...) Expand 10 before | Expand all | Expand 10 after
451 if (IsContextual(object)) { 451 if (IsContextual(object)) {
452 return ReferenceError("not_defined", name); 452 return ReferenceError("not_defined", name);
453 } 453 }
454 return TypeError("undefined_method", object, name); 454 return TypeError("undefined_method", object, name);
455 } 455 }
456 } 456 }
457 457
458 ASSERT(result != Heap::the_hole_value()); 458 ASSERT(result != Heap::the_hole_value());
459 459
460 if (result->IsJSFunction()) { 460 if (result->IsJSFunction()) {
461 // Check if there is an optimized (builtin) version of the function.
462 // Ignored this will degrade performance for some Array functions.
463 // Please note we only return the optimized function iff
464 // the JSObject has FastElements.
465 if (object->IsJSObject() && JSObject::cast(*object)->HasFastElements()) {
466 Object* opt = Top::LookupSpecialFunction(JSObject::cast(*object),
467 lookup.holder(),
468 JSFunction::cast(result));
469 if (opt->IsJSFunction()) return opt;
470 }
471
472 #ifdef ENABLE_DEBUGGER_SUPPORT 461 #ifdef ENABLE_DEBUGGER_SUPPORT
473 // Handle stepping into a function if step into is active. 462 // Handle stepping into a function if step into is active.
474 if (Debug::StepInActive()) { 463 if (Debug::StepInActive()) {
475 // Protect the result in a handle as the debugger can allocate and might 464 // Protect the result in a handle as the debugger can allocate and might
476 // cause GC. 465 // cause GC.
477 HandleScope scope; 466 HandleScope scope;
478 Handle<JSFunction> function(JSFunction::cast(result)); 467 Handle<JSFunction> function(JSFunction::cast(result));
479 Debug::HandleStepIn(function, object, fp(), false); 468 Debug::HandleStepIn(function, object, fp(), false);
480 return *function; 469 return *function;
481 } 470 }
(...skipping 1041 matching lines...) Expand 10 before | Expand all | Expand 10 after
1523 #undef ADDR 1512 #undef ADDR
1524 }; 1513 };
1525 1514
1526 1515
1527 Address IC::AddressFromUtilityId(IC::UtilityId id) { 1516 Address IC::AddressFromUtilityId(IC::UtilityId id) {
1528 return IC_utilities[id]; 1517 return IC_utilities[id];
1529 } 1518 }
1530 1519
1531 1520
1532 } } // namespace v8::internal 1521 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698