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

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

Issue 11308197: Change deprecated semantics of function template signatures. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments by Andreas Rossberg. Created 8 years 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/builtins.cc ('k') | test/cctest/test-api.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 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 1544 matching lines...) Expand 10 before | Expand all | Expand 10 after
1555 1555
1556 int CallOptimization::GetPrototypeDepthOfExpectedType( 1556 int CallOptimization::GetPrototypeDepthOfExpectedType(
1557 Handle<JSObject> object, 1557 Handle<JSObject> object,
1558 Handle<JSObject> holder) const { 1558 Handle<JSObject> holder) const {
1559 ASSERT(is_simple_api_call()); 1559 ASSERT(is_simple_api_call());
1560 if (expected_receiver_type_.is_null()) return 0; 1560 if (expected_receiver_type_.is_null()) return 0;
1561 int depth = 0; 1561 int depth = 0;
1562 while (!object.is_identical_to(holder)) { 1562 while (!object.is_identical_to(holder)) {
1563 if (object->IsInstanceOf(*expected_receiver_type_)) return depth; 1563 if (object->IsInstanceOf(*expected_receiver_type_)) return depth;
1564 object = Handle<JSObject>(JSObject::cast(object->GetPrototype())); 1564 object = Handle<JSObject>(JSObject::cast(object->GetPrototype()));
1565 if (!object->map()->is_hidden_prototype()) return kInvalidProtoDepth;
1565 ++depth; 1566 ++depth;
1566 } 1567 }
1567 if (holder->IsInstanceOf(*expected_receiver_type_)) return depth; 1568 if (holder->IsInstanceOf(*expected_receiver_type_)) return depth;
1568 return kInvalidProtoDepth; 1569 return kInvalidProtoDepth;
1569 } 1570 }
1570 1571
1571 1572
1572 void CallOptimization::Initialize(Handle<JSFunction> function) { 1573 void CallOptimization::Initialize(Handle<JSFunction> function) {
1573 constant_function_ = Handle<JSFunction>::null(); 1574 constant_function_ = Handle<JSFunction>::null();
1574 is_simple_api_call_ = false; 1575 is_simple_api_call_ = false;
(...skipping 27 matching lines...) Expand all
1602 Handle<FunctionTemplateInfo>( 1603 Handle<FunctionTemplateInfo>(
1603 FunctionTemplateInfo::cast(signature->receiver())); 1604 FunctionTemplateInfo::cast(signature->receiver()));
1604 } 1605 }
1605 } 1606 }
1606 1607
1607 is_simple_api_call_ = true; 1608 is_simple_api_call_ = true;
1608 } 1609 }
1609 1610
1610 1611
1611 } } // namespace v8::internal 1612 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/builtins.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698