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

Side by Side Diff: src/objects.cc

Issue 8879010: Increase eval compilation cache hits. Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years 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/compilation-cache.cc ('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 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 10290 matching lines...) Expand 10 before | Expand all | Expand 10 after
10301 int scope_position) 10301 int scope_position)
10302 : source_(source), 10302 : source_(source),
10303 shared_(shared), 10303 shared_(shared),
10304 language_mode_(language_mode), 10304 language_mode_(language_mode),
10305 scope_position_(scope_position) { } 10305 scope_position_(scope_position) { }
10306 10306
10307 bool IsMatch(Object* other) { 10307 bool IsMatch(Object* other) {
10308 if (!other->IsFixedArray()) return false; 10308 if (!other->IsFixedArray()) return false;
10309 FixedArray* other_array = FixedArray::cast(other); 10309 FixedArray* other_array = FixedArray::cast(other);
10310 SharedFunctionInfo* shared = SharedFunctionInfo::cast(other_array->get(0)); 10310 SharedFunctionInfo* shared = SharedFunctionInfo::cast(other_array->get(0));
10311 if (shared != shared_) return false; 10311 if (shared->script() != shared_->script()) return false;
10312 int language_unchecked = Smi::cast(other_array->get(2))->value(); 10312 int language_unchecked = Smi::cast(other_array->get(2))->value();
10313 ASSERT(language_unchecked == CLASSIC_MODE || 10313 ASSERT(language_unchecked == CLASSIC_MODE ||
10314 language_unchecked == STRICT_MODE || 10314 language_unchecked == STRICT_MODE ||
10315 language_unchecked == EXTENDED_MODE); 10315 language_unchecked == EXTENDED_MODE);
10316 LanguageMode language_mode = static_cast<LanguageMode>(language_unchecked); 10316 LanguageMode language_mode = static_cast<LanguageMode>(language_unchecked);
10317 if (language_mode != language_mode_) return false; 10317 if (language_mode != language_mode_) return false;
10318 int scope_position = Smi::cast(other_array->get(3))->value(); 10318 int scope_position = Smi::cast(other_array->get(3))->value();
10319 if (scope_position != scope_position_) return false; 10319 if (scope_position != scope_position_) return false;
10320 String* source = String::cast(other_array->get(1)); 10320 String* source = String::cast(other_array->get(1));
10321 return source->Equals(source_); 10321 return source->Equals(source_);
(...skipping 2218 matching lines...) Expand 10 before | Expand all | Expand 10 after
12540 if (break_point_objects()->IsUndefined()) return 0; 12540 if (break_point_objects()->IsUndefined()) return 0;
12541 // Single break point. 12541 // Single break point.
12542 if (!break_point_objects()->IsFixedArray()) return 1; 12542 if (!break_point_objects()->IsFixedArray()) return 1;
12543 // Multiple break points. 12543 // Multiple break points.
12544 return FixedArray::cast(break_point_objects())->length(); 12544 return FixedArray::cast(break_point_objects())->length();
12545 } 12545 }
12546 #endif // ENABLE_DEBUGGER_SUPPORT 12546 #endif // ENABLE_DEBUGGER_SUPPORT
12547 12547
12548 12548
12549 } } // namespace v8::internal 12549 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/compilation-cache.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698