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

Side by Side Diff: src/ast.cc

Issue 11973008: Replace special IC builtins and stubs in the map's cache by codestubs. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments Created 7 years, 11 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/arm/stub-cache-arm.cc ('k') | src/builtins.h » ('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 11 matching lines...) Expand all
22 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 22 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 27
28 #include "ast.h" 28 #include "ast.h"
29 29
30 #include <math.h> // For isfinite. 30 #include <math.h> // For isfinite.
31 #include "builtins.h" 31 #include "builtins.h"
32 #include "code-stubs.h"
32 #include "conversions.h" 33 #include "conversions.h"
33 #include "hashmap.h" 34 #include "hashmap.h"
34 #include "parser.h" 35 #include "parser.h"
35 #include "property-details.h" 36 #include "property-details.h"
36 #include "property.h" 37 #include "property.h"
37 #include "scopes.h" 38 #include "scopes.h"
38 #include "string-stream.h" 39 #include "string-stream.h"
39 #include "type-info.h" 40 #include "type-info.h"
40 41
41 namespace v8 { 42 namespace v8 {
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 406
406 void Property::RecordTypeFeedback(TypeFeedbackOracle* oracle, 407 void Property::RecordTypeFeedback(TypeFeedbackOracle* oracle,
407 Zone* zone) { 408 Zone* zone) {
408 // Record type feedback from the oracle in the AST. 409 // Record type feedback from the oracle in the AST.
409 is_uninitialized_ = oracle->LoadIsUninitialized(this); 410 is_uninitialized_ = oracle->LoadIsUninitialized(this);
410 if (is_uninitialized_) return; 411 if (is_uninitialized_) return;
411 412
412 is_monomorphic_ = oracle->LoadIsMonomorphicNormal(this); 413 is_monomorphic_ = oracle->LoadIsMonomorphicNormal(this);
413 receiver_types_.Clear(); 414 receiver_types_.Clear();
414 if (key()->IsPropertyName()) { 415 if (key()->IsPropertyName()) {
416 StringLengthStub string_stub(Code::LOAD_IC, false);
415 if (oracle->LoadIsBuiltin(this, Builtins::kLoadIC_ArrayLength)) { 417 if (oracle->LoadIsBuiltin(this, Builtins::kLoadIC_ArrayLength)) {
416 is_array_length_ = true; 418 is_array_length_ = true;
417 } else if (oracle->LoadIsBuiltin(this, Builtins::kLoadIC_StringLength)) { 419 } else if (oracle->LoadIsStub(this, &string_stub)) {
418 is_string_length_ = true; 420 is_string_length_ = true;
419 } else if (oracle->LoadIsBuiltin(this, 421 } else if (oracle->LoadIsBuiltin(this,
420 Builtins::kLoadIC_FunctionPrototype)) { 422 Builtins::kLoadIC_FunctionPrototype)) {
421 is_function_prototype_ = true; 423 is_function_prototype_ = true;
422 } else { 424 } else {
423 Literal* lit_key = key()->AsLiteral(); 425 Literal* lit_key = key()->AsLiteral();
424 ASSERT(lit_key != NULL && lit_key->handle()->IsString()); 426 ASSERT(lit_key != NULL && lit_key->handle()->IsString());
425 Handle<String> name = Handle<String>::cast(lit_key->handle()); 427 Handle<String> name = Handle<String>::cast(lit_key->handle());
426 oracle->LoadReceiverTypes(this, name, &receiver_types_); 428 oracle->LoadReceiverTypes(this, name, &receiver_types_);
427 } 429 }
(...skipping 683 matching lines...) Expand 10 before | Expand all | Expand 10 after
1111 OS::SNPrintF(buffer, "%d", Smi::cast(*handle_)->value()); 1113 OS::SNPrintF(buffer, "%d", Smi::cast(*handle_)->value());
1112 str = arr; 1114 str = arr;
1113 } else { 1115 } else {
1114 str = DoubleToCString(handle_->Number(), buffer); 1116 str = DoubleToCString(handle_->Number(), buffer);
1115 } 1117 }
1116 return FACTORY->NewStringFromAscii(CStrVector(str)); 1118 return FACTORY->NewStringFromAscii(CStrVector(str));
1117 } 1119 }
1118 1120
1119 1121
1120 } } // namespace v8::internal 1122 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/stub-cache-arm.cc ('k') | src/builtins.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698