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

Side by Side Diff: src/objects.cc

Issue 247523004: Fix tracking of computed fields when field type tracking is disabled. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 8 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 #ifdef ENABLE_DISASSEMBLER 56 #ifdef ENABLE_DISASSEMBLER
57 #include "disasm.h" 57 #include "disasm.h"
58 #include "disassembler.h" 58 #include "disassembler.h"
59 #endif 59 #endif
60 60
61 namespace v8 { 61 namespace v8 {
62 namespace internal { 62 namespace internal {
63 63
64 Handle<HeapType> Object::OptimalType(Isolate* isolate, 64 Handle<HeapType> Object::OptimalType(Isolate* isolate,
65 Representation representation) { 65 Representation representation) {
66 if (representation.IsNone()) return HeapType::None(isolate);
66 if (FLAG_track_field_types) { 67 if (FLAG_track_field_types) {
67 if (representation.IsNone()) return HeapType::None(isolate);
68 if (representation.IsHeapObject() && IsHeapObject()) { 68 if (representation.IsHeapObject() && IsHeapObject()) {
69 // We can track only JavaScript objects with stable maps. 69 // We can track only JavaScript objects with stable maps.
70 Handle<Map> map(HeapObject::cast(this)->map(), isolate); 70 Handle<Map> map(HeapObject::cast(this)->map(), isolate);
71 if (map->is_stable() && 71 if (map->is_stable() &&
72 map->instance_type() >= FIRST_NONCALLABLE_SPEC_OBJECT_TYPE && 72 map->instance_type() >= FIRST_NONCALLABLE_SPEC_OBJECT_TYPE &&
73 map->instance_type() <= LAST_NONCALLABLE_SPEC_OBJECT_TYPE) { 73 map->instance_type() <= LAST_NONCALLABLE_SPEC_OBJECT_TYPE) {
74 return HeapType::Class(map, isolate); 74 return HeapType::Class(map, isolate);
75 } 75 }
76 } 76 }
77 } 77 }
(...skipping 17354 matching lines...) Expand 10 before | Expand all | Expand 10 after
17432 #define ERROR_MESSAGES_TEXTS(C, T) T, 17432 #define ERROR_MESSAGES_TEXTS(C, T) T,
17433 static const char* error_messages_[] = { 17433 static const char* error_messages_[] = {
17434 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) 17434 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS)
17435 }; 17435 };
17436 #undef ERROR_MESSAGES_TEXTS 17436 #undef ERROR_MESSAGES_TEXTS
17437 return error_messages_[reason]; 17437 return error_messages_[reason];
17438 } 17438 }
17439 17439
17440 17440
17441 } } // namespace v8::internal 17441 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698