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

Side by Side Diff: src/isolate.cc

Issue 10592003: Add missing cast to make MSVC happier. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 years, 6 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 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 1590 matching lines...) Expand 10 before | Expand all | Expand 10 after
1601 state_ = UNINITIALIZED; 1601 state_ = UNINITIALIZED;
1602 } 1602 }
1603 } 1603 }
1604 1604
1605 1605
1606 void Isolate::PushToPartialSnapshotCache(Object* obj) { 1606 void Isolate::PushToPartialSnapshotCache(Object* obj) {
1607 int length = serialize_partial_snapshot_cache_length(); 1607 int length = serialize_partial_snapshot_cache_length();
1608 int capacity = serialize_partial_snapshot_cache_capacity(); 1608 int capacity = serialize_partial_snapshot_cache_capacity();
1609 1609
1610 if (length >= capacity) { 1610 if (length >= capacity) {
1611 int new_capacity = (capacity + 10) * 1.2; 1611 int new_capacity = static_cast<int>((capacity + 10) * 1.2);
1612 Object** new_array = new Object*[new_capacity]; 1612 Object** new_array = new Object*[new_capacity];
1613 for (int i = 0; i < length; i++) { 1613 for (int i = 0; i < length; i++) {
1614 new_array[i] = serialize_partial_snapshot_cache()[i]; 1614 new_array[i] = serialize_partial_snapshot_cache()[i];
1615 } 1615 }
1616 if (capacity != 0) delete[] serialize_partial_snapshot_cache(); 1616 if (capacity != 0) delete[] serialize_partial_snapshot_cache();
1617 set_serialize_partial_snapshot_cache(new_array); 1617 set_serialize_partial_snapshot_cache(new_array);
1618 set_serialize_partial_snapshot_cache_capacity(new_capacity); 1618 set_serialize_partial_snapshot_cache_capacity(new_capacity);
1619 } 1619 }
1620 1620
1621 serialize_partial_snapshot_cache()[length] = obj; 1621 serialize_partial_snapshot_cache()[length] = obj;
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
1994 1994
1995 #ifdef DEBUG 1995 #ifdef DEBUG
1996 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ 1996 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \
1997 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); 1997 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_);
1998 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) 1998 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET)
1999 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) 1999 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET)
2000 #undef ISOLATE_FIELD_OFFSET 2000 #undef ISOLATE_FIELD_OFFSET
2001 #endif 2001 #endif
2002 2002
2003 } } // namespace v8::internal 2003 } } // 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