Commit e78a32eb authored by olehougaard's avatar olehougaard

Introducing a kUninitialized constant used for clearing the function cache.

Review URL: http://codereview.chromium.org/17639

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1057 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent e13aed2d
......@@ -64,8 +64,7 @@ function InstantiateFunction(data, name) {
var cache = kApiFunctionCache;
var serialNumber = %GetTemplateField(data, kApiSerialNumberOffset);
var isFunctionCached =
(serialNumber in cache) &&
(cache[serialNumber] != -1);
(serialNumber in cache) && (cache[serialNumber] != kUninitialized);
if (!isFunctionCached) {
try {
cache[serialNumber] = null;
......@@ -82,7 +81,7 @@ function InstantiateFunction(data, name) {
}
ConfigureTemplateInstance(fun, data);
} catch (e) {
cache[serialNumber] = -1;
cache[serialNumber] = kUninitialized;
throw e;
}
}
......
......@@ -61,6 +61,9 @@ const msPerMinute = 60000;
const msPerHour = 3600000;
const msPerDay = 86400000;
# For apinatives.js
const kUninitialized = -1;
# Note: kDayZeroInJulianDay = ToJulianDay(1970, 0, 1).
const kInvalidDate = 'Invalid Date';
const kDayZeroInJulianDay = 2440588;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment