OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
400 return NULL; | 400 return NULL; |
401 } | 401 } |
402 } | 402 } |
403 | 403 |
404 | 404 |
405 void TypeFeedbackOracle::SetInfo(unsigned ast_id, Object* target) { | 405 void TypeFeedbackOracle::SetInfo(unsigned ast_id, Object* target) { |
406 ASSERT(dictionary_->FindEntry(ast_id) == NumberDictionary::kNotFound); | 406 ASSERT(dictionary_->FindEntry(ast_id) == NumberDictionary::kNotFound); |
407 MaybeObject* maybe_result = dictionary_->AtNumberPut(ast_id, target); | 407 MaybeObject* maybe_result = dictionary_->AtNumberPut(ast_id, target); |
408 USE(maybe_result); | 408 USE(maybe_result); |
409 #ifdef DEBUG | 409 #ifdef DEBUG |
410 Object* result; | 410 Object* result = NULL; |
411 // Dictionary has been allocated with sufficient size for all elements. | 411 // Dictionary has been allocated with sufficient size for all elements. |
412 ASSERT(maybe_result->ToObject(&result)); | 412 ASSERT(maybe_result->ToObject(&result)); |
413 ASSERT(*dictionary_ == result); | 413 ASSERT(*dictionary_ == result); |
414 #endif | 414 #endif |
415 } | 415 } |
416 | 416 |
417 | 417 |
418 void TypeFeedbackOracle::PopulateMap(Handle<Code> code) { | 418 void TypeFeedbackOracle::PopulateMap(Handle<Code> code) { |
419 Isolate* isolate = Isolate::Current(); | 419 Isolate* isolate = Isolate::Current(); |
420 HandleScope scope(isolate); | 420 HandleScope scope(isolate); |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
496 static_cast<int>(info->pc() - code->instruction_start())); | 496 static_cast<int>(info->pc() - code->instruction_start())); |
497 ASSERT(ast_ids->length() == 0 || | 497 ASSERT(ast_ids->length() == 0 || |
498 (*ast_ids)[ast_ids->length()-1] != | 498 (*ast_ids)[ast_ids->length()-1] != |
499 static_cast<unsigned>(info->data())); | 499 static_cast<unsigned>(info->data())); |
500 ast_ids->Add(static_cast<unsigned>(info->data())); | 500 ast_ids->Add(static_cast<unsigned>(info->data())); |
501 } | 501 } |
502 } | 502 } |
503 } | 503 } |
504 | 504 |
505 } } // namespace v8::internal | 505 } } // namespace v8::internal |
OLD | NEW |