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

Side by Side Diff: src/objects.cc

Issue 19784004: Track all non-hole global constants. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 5 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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 15900 matching lines...) Expand 10 before | Expand all | Expand 10 after
15911 void PropertyCell::set_type(Type* type, WriteBarrierMode ignored) { 15911 void PropertyCell::set_type(Type* type, WriteBarrierMode ignored) {
15912 ASSERT(IsPropertyCell()); 15912 ASSERT(IsPropertyCell());
15913 set_type_raw(type, ignored); 15913 set_type_raw(type, ignored);
15914 } 15914 }
15915 15915
15916 15916
15917 Type* PropertyCell::UpdateType(Handle<PropertyCell> cell, 15917 Type* PropertyCell::UpdateType(Handle<PropertyCell> cell,
15918 Handle<Object> value) { 15918 Handle<Object> value) {
15919 Isolate* isolate = cell->GetIsolate(); 15919 Isolate* isolate = cell->GetIsolate();
15920 Handle<Type> old_type(cell->type(), isolate); 15920 Handle<Type> old_type(cell->type(), isolate);
15921 Handle<Type> new_type((value->IsSmi() || value->IsJSFunction() || 15921 Handle<Type> new_type(value->IsTheHole()
15922 value->IsUndefined()) 15922 ? Type::Any()
15923 ? Type::Constant(value, isolate) 15923 : Type::Constant(value, isolate), isolate);
15924 : Type::Any(), isolate);
15925 15924
15926 if (new_type->Is(old_type)) { 15925 if (new_type->Is(old_type)) {
15927 return *old_type; 15926 return *old_type;
15928 } 15927 }
15929 15928
15930 cell->dependent_code()->DeoptimizeDependentCodeGroup( 15929 cell->dependent_code()->DeoptimizeDependentCodeGroup(
15931 isolate, DependentCode::kPropertyCellChangedGroup); 15930 isolate, DependentCode::kPropertyCellChangedGroup);
15932 15931
15933 if (old_type->Is(Type::None()) || old_type->Is(Type::Undefined())) { 15932 if (old_type->Is(Type::None()) || old_type->Is(Type::Undefined())) {
15934 return *new_type; 15933 return *new_type;
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
15968 15967
15969 void PropertyCell::AddDependentCode(Handle<Code> code) { 15968 void PropertyCell::AddDependentCode(Handle<Code> code) {
15970 Handle<DependentCode> codes = DependentCode::Insert( 15969 Handle<DependentCode> codes = DependentCode::Insert(
15971 Handle<DependentCode>(dependent_code()), 15970 Handle<DependentCode>(dependent_code()),
15972 DependentCode::kPropertyCellChangedGroup, code); 15971 DependentCode::kPropertyCellChangedGroup, code);
15973 if (*codes != dependent_code()) set_dependent_code(*codes); 15972 if (*codes != dependent_code()) set_dependent_code(*codes);
15974 } 15973 }
15975 15974
15976 15975
15977 } } // namespace v8::internal 15976 } } // 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