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

Side by Side Diff: src/hydrogen.cc

Issue 12620014: Fix detection of |handle_smi| case in HOptimizedGraphBuilder::HandlePolymorphicCallNamed (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 9 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 | test/mjsunit/regress/regress-crbug-196583.js » ('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 7387 matching lines...) Expand 10 before | Expand all | Expand 10 after
7398 Handle<Map> number_marker_map( 7398 Handle<Map> number_marker_map(
7399 JSObject::cast(initial_number_map->prototype())->map()); 7399 JSObject::cast(initial_number_map->prototype())->map());
7400 Handle<Map> heap_number_map = isolate()->factory()->heap_number_map(); 7400 Handle<Map> heap_number_map = isolate()->factory()->heap_number_map();
7401 7401
7402 bool handle_smi = false; 7402 bool handle_smi = false;
7403 7403
7404 for (int i = 0; 7404 for (int i = 0;
7405 i < types->length() && ordered_functions < kMaxCallPolymorphism; 7405 i < types->length() && ordered_functions < kMaxCallPolymorphism;
7406 ++i) { 7406 ++i) {
7407 Handle<Map> map = types->at(i); 7407 Handle<Map> map = types->at(i);
7408 if (map.is_identical_to(number_marker_map)) handle_smi = true;
7409 if (expr->ComputeTarget(map, name)) { 7408 if (expr->ComputeTarget(map, name)) {
7409 if (map.is_identical_to(number_marker_map)) handle_smi = true;
7410 order[ordered_functions++] = 7410 order[ordered_functions++] =
7411 FunctionSorter(i, 7411 FunctionSorter(i,
7412 expr->target()->shared()->profiler_ticks(), 7412 expr->target()->shared()->profiler_ticks(),
7413 InliningAstSize(expr->target()), 7413 InliningAstSize(expr->target()),
7414 expr->target()->shared()->SourceSize()); 7414 expr->target()->shared()->SourceSize());
7415 } 7415 }
7416 } 7416 }
7417 7417
7418 qsort(reinterpret_cast<void*>(&order[0]), 7418 qsort(reinterpret_cast<void*>(&order[0]),
7419 ordered_functions, 7419 ordered_functions,
(...skipping 3529 matching lines...) Expand 10 before | Expand all | Expand 10 after
10949 } 10949 }
10950 } 10950 }
10951 10951
10952 #ifdef DEBUG 10952 #ifdef DEBUG
10953 if (graph_ != NULL) graph_->Verify(false); // No full verify. 10953 if (graph_ != NULL) graph_->Verify(false); // No full verify.
10954 if (allocator_ != NULL) allocator_->Verify(); 10954 if (allocator_ != NULL) allocator_->Verify();
10955 #endif 10955 #endif
10956 } 10956 }
10957 10957
10958 } } // namespace v8::internal 10958 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-crbug-196583.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698