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

Side by Side Diff: src/type-info.cc

Issue 14660008: Fix braindead Handle::is_identical_to (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Also fix (and broaden) zap value assertions Created 7 years, 7 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/handles-inl.h ('k') | 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 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 60
61 61
62 TypeFeedbackOracle::TypeFeedbackOracle(Handle<Code> code, 62 TypeFeedbackOracle::TypeFeedbackOracle(Handle<Code> code,
63 Handle<Context> native_context, 63 Handle<Context> native_context,
64 Isolate* isolate, 64 Isolate* isolate,
65 Zone* zone) 65 Zone* zone)
66 : native_context_(native_context), 66 : native_context_(native_context),
67 isolate_(isolate), 67 isolate_(isolate),
68 zone_(zone) { 68 zone_(zone) {
69 BuildDictionary(code); 69 BuildDictionary(code);
70 ASSERT(reinterpret_cast<Address>(*dictionary_.location()) != kHandleZapValue); 70 ASSERT(dictionary_->IsDictionary());
71 } 71 }
72 72
73 73
74 static uint32_t IdToKey(TypeFeedbackId ast_id) { 74 static uint32_t IdToKey(TypeFeedbackId ast_id) {
75 return static_cast<uint32_t>(ast_id.ToInt()); 75 return static_cast<uint32_t>(ast_id.ToInt());
76 } 76 }
77 77
78 78
79 Handle<Object> TypeFeedbackOracle::GetInfo(TypeFeedbackId ast_id) { 79 Handle<Object> TypeFeedbackOracle::GetInfo(TypeFeedbackId ast_id) {
80 int entry = dictionary_->FindEntry(IdToKey(ast_id)); 80 int entry = dictionary_->FindEntry(IdToKey(ast_id));
(...skipping 692 matching lines...) Expand 10 before | Expand all | Expand 10 after
773 USE(maybe_result); 773 USE(maybe_result);
774 #ifdef DEBUG 774 #ifdef DEBUG
775 Object* result = NULL; 775 Object* result = NULL;
776 // Dictionary has been allocated with sufficient size for all elements. 776 // Dictionary has been allocated with sufficient size for all elements.
777 ASSERT(maybe_result->ToObject(&result)); 777 ASSERT(maybe_result->ToObject(&result));
778 ASSERT(*dictionary_ == result); 778 ASSERT(*dictionary_ == result);
779 #endif 779 #endif
780 } 780 }
781 781
782 } } // namespace v8::internal 782 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/handles-inl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698