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

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

Issue 6973025: Fixed TypeFeedbackOracle for unary operations: Record code for the corresponding (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 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 | « 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 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 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
434 for (int i = 0; i < length; i++) { 434 for (int i = 0; i < length; i++) {
435 AssertNoAllocation no_allocation; 435 AssertNoAllocation no_allocation;
436 RelocInfo info(code->instruction_start() + code_positions[i], 436 RelocInfo info(code->instruction_start() + code_positions[i],
437 RelocInfo::CODE_TARGET, 0); 437 RelocInfo::CODE_TARGET, 0);
438 Code* target = Code::GetCodeFromTargetAddress(info.target_address()); 438 Code* target = Code::GetCodeFromTargetAddress(info.target_address());
439 unsigned id = ast_ids[i]; 439 unsigned id = ast_ids[i];
440 InlineCacheState state = target->ic_state(); 440 InlineCacheState state = target->ic_state();
441 Code::Kind kind = target->kind(); 441 Code::Kind kind = target->kind();
442 442
443 if (kind == Code::TYPE_RECORDING_BINARY_OP_IC || 443 if (kind == Code::TYPE_RECORDING_BINARY_OP_IC ||
444 kind == Code::TYPE_RECORDING_UNARY_OP_IC ||
444 kind == Code::COMPARE_IC) { 445 kind == Code::COMPARE_IC) {
445 SetInfo(id, target); 446 SetInfo(id, target);
446 } else if (state == MONOMORPHIC) { 447 } else if (state == MONOMORPHIC) {
447 if (kind == Code::KEYED_EXTERNAL_ARRAY_LOAD_IC || 448 if (kind == Code::KEYED_EXTERNAL_ARRAY_LOAD_IC ||
448 kind == Code::KEYED_EXTERNAL_ARRAY_STORE_IC) { 449 kind == Code::KEYED_EXTERNAL_ARRAY_STORE_IC) {
449 SetInfo(id, target); 450 SetInfo(id, target);
450 } else if (kind != Code::CALL_IC || 451 } else if (kind != Code::CALL_IC ||
451 target->check_type() == RECEIVER_MAP_CHECK) { 452 target->check_type() == RECEIVER_MAP_CHECK) {
452 Map* map = target->FindFirstMap(); 453 Map* map = target->FindFirstMap();
453 if (map == NULL) { 454 if (map == NULL) {
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 static_cast<int>(info->pc() - code->instruction_start())); 497 static_cast<int>(info->pc() - code->instruction_start()));
497 ASSERT(ast_ids->length() == 0 || 498 ASSERT(ast_ids->length() == 0 ||
498 (*ast_ids)[ast_ids->length()-1] != 499 (*ast_ids)[ast_ids->length()-1] !=
499 static_cast<unsigned>(info->data())); 500 static_cast<unsigned>(info->data()));
500 ast_ids->Add(static_cast<unsigned>(info->data())); 501 ast_ids->Add(static_cast<unsigned>(info->data()));
501 } 502 }
502 } 503 }
503 } 504 }
504 505
505 } } // namespace v8::internal 506 } } // 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